79786865

Date: 2025-10-09 21:42:53
Score: 1
Natty:
Report link

No.

  1. In C23, <stdalign.h> provides no content. There is no alignas macro, no alignof macro, and no __alignas_is_defined or __alignof_is_defined macros.

  2. In C++, both alignas and alignof are keywords, and the C++ standard forbids C++ standard library headers from defining macros with names that are C++ keywords. So <stdalign.h> in C++ must not define an alignas macro or an alignof macro. eel.is

  3. What <stdalign.h> can still provide in C++23 are the feature-test macros. __alignas_is_defined is present but deprecated in C++23, and __alignof_is_defined is also provided via the “same as C header” wording and is being explicitly tracked so it can be deprecated as well. Both expand to 1. GitHub

For reference, the current C++ working draft points <stdalign.h> at C23’s header, which is empty, so including it in C++ has no effect. The general prohibition on keyword-named macros remains in force. eel.is

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Jessica Lavrov