Provide a constexpr addressof with GCC 7.
__builtin_addressof was added to the GCC trunk in the past week. This patch teaches libc++ about it so it can correctly provide constexpr addressof. Unfortunately this patch will break users of earlier GCC 7 builds, since we expect __builtin_addressof but one won't be provided. One option would be to only use __builtin_addressof for GCC 7.1 and above, but that means waiting for another release. Instead I've specifically chosen to break older GCC 7 versions. Since GCC 7 has yet to be released, and the 7.0 release is a development release, I believe that anybody currently using GCC 7.0 will have no issue upgrading. llvm-svn: 283715
Showing
- libcxx/include/type_traits 1 addition, 1 deletionlibcxx/include/type_traits
- libcxx/test/libcxx/test/config.py 1 addition, 0 deletionslibcxx/test/libcxx/test/config.py
- libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/constexpr_addressof.pass.cpp 1 addition, 1 deletion...rithms/specialized.addressof/constexpr_addressof.pass.cpp
Loading
Please register or sign in to comment