parent
a7b443a6bf
commit
1cb2af0b3a
|
@ -668,7 +668,7 @@ parsing with C++11's square bracket notation is enabled.</p>
|
|||
|
||||
<p>Use <tt>__has_feature(cxx_constexpr)</tt> to determine if support
|
||||
for generalized constant expressions (e.g., <tt>constexpr</tt>) is
|
||||
enabled. Clang does not currently implement this feature.</p>
|
||||
enabled.</p>
|
||||
|
||||
<h4 id="cxx_decltype">C++11 <tt>decltype()</tt></h4>
|
||||
|
||||
|
|
|
@ -638,7 +638,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
|
|||
.Case("cxx_atomic", LangOpts.CPlusPlus0x)
|
||||
.Case("cxx_attributes", LangOpts.CPlusPlus0x)
|
||||
.Case("cxx_auto_type", LangOpts.CPlusPlus0x)
|
||||
//.Case("cxx_constexpr", false);
|
||||
.Case("cxx_constexpr", LangOpts.CPlusPlus0x)
|
||||
.Case("cxx_decltype", LangOpts.CPlusPlus0x)
|
||||
.Case("cxx_default_function_template_args", LangOpts.CPlusPlus0x)
|
||||
.Case("cxx_defaulted_functions", LangOpts.CPlusPlus0x)
|
||||
|
|
|
@ -217,3 +217,12 @@ int no_unicode_literals();
|
|||
|
||||
// CHECK-0X: has_unicode_literals
|
||||
// CHECK-NO-0X: no_unicode_literals
|
||||
|
||||
#if __has_feature(cxx_constexpr)
|
||||
int has_constexpr();
|
||||
#else
|
||||
int no_constexpr();
|
||||
#endif
|
||||
|
||||
// CHECK-0X: has_constexpr
|
||||
// CHECK-NO-0X: no_constexpr
|
||||
|
|
Loading…
Reference in New Issue