[+] AU_ALIGN
[*] Enforce reasonable SOO alignment
This commit is contained in:
parent
936400c1b6
commit
b76a0a810e
@ -157,6 +157,14 @@
|
||||
#define AU_FWD(var) AuForward<decltype(var)>(var)
|
||||
#endif
|
||||
|
||||
#if !defined(AU_ALIGN)
|
||||
#if defined(AURORA_COMPILER_MSVC)
|
||||
#define AU_ALIGN(uSize) __declspec(align(uSize))
|
||||
#else
|
||||
#define AU_ALIGN(uSize) __attribute__((aligned(uSize)))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_AURORA_MISSING_STD_EXCEPTION)
|
||||
|
||||
#define AuStringException AuString
|
||||
|
@ -39,7 +39,7 @@
|
||||
vis ~type();
|
||||
|
||||
#define AUROXTL_INTERFACE_SOO_HDR_EX2(vis, Type, extends, targetSize, ex, ...) \
|
||||
struct Type ## SOO \
|
||||
struct AU_ALIGN(sizeof(AuUInt)) Type ## SOO \
|
||||
{ \
|
||||
AU_WHAT ex \
|
||||
AUROXTL_INTERFACE_SOO_HDR_(vis, Type ## SOO, targetSize, ## __VA_ARGS__) \
|
||||
|
@ -397,12 +397,7 @@ template <class F, class... Args>
|
||||
constexpr auto AuIsCallable_v = AuCallable<F, Args...>::value;
|
||||
|
||||
template <AuUInt uSize, class T>
|
||||
struct
|
||||
#if defined(AURORA_COMPILER_MSVC)
|
||||
__declspec(align(uSize))
|
||||
#else
|
||||
__attribute__((aligned(uSize)))
|
||||
#endif
|
||||
struct AU_ALIGN(uSize)
|
||||
AuAlignTo : T
|
||||
{
|
||||
};
|
Loading…
Reference in New Issue
Block a user