Reputation: 4804
Are there generalized attributes for C++11 for indicating that a variable is memory aligned in GCC/Clang?
(Note that I'm familiar with __builtin_assume_aligned. I was wondering if there was a way to do that using the C++11 generalized attributes feature)
Upvotes: 3
Views: 1249
Reputation: 477140
C++11 introduces two separate changes:
Alignment support with alignas
and alignof
.
Attributes, such as [[noreturn]]
and [[carries_dependency]]
.
Both are summarily called "Attributes" by the Standard, see section 7.6.
Upvotes: 2