[PATCH] D16751: Enable constexpr on Visual Studio 2015, add support for two equivalent attributes
Alexander Riccio via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 20:55:07 PST 2016
ariccio added a comment.
Responded to single comment.
Comment at: C:/LLVM/llvm/include/llvm/Support/Compiler.h:95
@@ -94,3 +94,3 @@
-#if __has_feature(cxx_constexpr) || defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if __has_feature(cxx_constexpr) || defined(__GXX_EXPERIMENTAL_CXX0X__) || LLVM_MSC_PREREQ(1900)
# define LLVM_CONSTEXPR constexpr
> I think this is reasonable, but we may still get some failures depending on usage. MSVC's constexpr support is drastically improved in MSVC 2015, but is not C++14 constexpr, it's C++11 constexpr.
That's a valid concern, but everything built fine.
...so I guess LLVM doesn't yet use C++14 `constexpr`?
More information about the llvm-commits