You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we can see on this Godbolt link, even when compiling in earlier dialects than C++20 (such as C++17), we get a compiler error since no_unique_address is effectively a reserved word even in pre-C++20 dialects.
Some context: Clang supports [[no_unique_address] in all dialects for C++11 and later (I don't know why it doesn't support it in C++03 mode, even as __attribute__((no_unique_address))).
Failing to support a double-underscored no_unique_address means that no_unique_address encroaches into the user's namespace in C++11 through C++17 dialects which is not good.
One resolution would be if Clang could start supporting a __dundered form of no_unique_address that would be safely usable by the implementor, e.g. __attribute__((__no_unique_address__)).