Ruby
3.4.0dev (2024-11-22 revision 0989400a925cd201defdca9eb28eb87200b30785)
|
Defines RUBY_ALIGNAS / RUBY_ALIGNOF. More...
#include "ruby/internal/stdalign.h"
Go to the source code of this file.
Macros | |
#define | RUBY_ALIGNAS RBIMPL_ALIGNAS |
Wraps (or simulates) alignas . More... | |
#define | RUBY_ALIGNOF RBIMPL_ALIGNOF |
Wraps (or simulates) alignof . More... | |
Defines RUBY_ALIGNAS / RUBY_ALIGNOF.
RBIMPL
or rbimpl
are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will. __VA_ARGS__
is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98. Definition in file stdalign.h.
#define RUBY_ALIGNAS RBIMPL_ALIGNAS |
Wraps (or simulates) alignas
.
This is C++11's alignas
and is different from C11 _Alignas
. For instance,
is a valid C++ while
is an invalid C because:
struct _Alignas
.typedef
cannot have alignments. Definition at line 27 of file stdalign.h.
#define RUBY_ALIGNOF RBIMPL_ALIGNOF |
Wraps (or simulates) alignof
.
We want C11's _Alignof
. However in spite of its clear language, compilers (including GCC and clang) tend to have buggy implementations. We have to avoid such things to resort to our own version.
Definition at line 28 of file stdalign.h.