Currently libc++ will not compile in c++1y mode with GCC since GCC does not yet support relaxed constexpr rules. This patch only defines _LIBCXX_CONSTEXPR_AFTER_CXX11 only if relaxed constexpr rules are available.
This patch introduces the _LIBCXX_HAS_NO_RELAXED_CONSTEXPR macro that should be defined when a compiler does not support the relaxed constexpr rules. Currently this macro is defined:
- On clang when __has_feature(cxx_relaxed_constexpr) is false.
- Unconditionally on GCC.
- Unconditionally on MSVC.
Although not all uses of _LIBCXX_CONSTEXPR_AFTER_CXX11 require the relaxed rules it would be very messy to selectively enable usages that do.
Are there any opposing viewpoints to this method of handling _LIBCPP_CONSTEXPR_AFTER_CXX11 ?