summaryrefslogtreecommitdiff
path: root/ext/-test-/RUBY_ALIGNOF/cpp.cpp
blob: ea1211c38c2c117d5f121170aca4950693df25f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "ruby.h"
#include <cstddef>

struct T {
    char _;
    double t;
};

RBIMPL_STATIC_ASSERT(RUBY_ALIGNOF, RUBY_ALIGNOF(double) == offsetof(T, t));

extern "C" void
Init_RUBY_ALIGNOF()
{
    // Windows linker mandates this symbol to exist.
}