2

Clang first claimed support, via __has_feature(cxx_alignof), for C++11's alignof keyword in r223186 (December 2014). This corresponds to Clang 3.6 by the Clang project's marketing version number.

But that revision only implements the feature-test: alignof support happened earlier. Indeed, Clang's C++ status page says alignof was implemented in Clang 3.3!

I work on a project that requires Clang 3.3 (or its equivalent) but not yet Clang 3.6. Are there bugs in Clang 3.3-3.5's alignof implementation that delayed feature-testing support, or was non-support merely an oversight? Can I safely use alignof in this project, even though __has_feature(cxx_alignof) might claim alignof isn't supported?

Jeff Walden
  • 7,008
  • 2
  • 38
  • 55

0 Answers0