зеркало из https://github.com/microsoft/clang-1.git
User-defined literals are done.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152396 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
3a5032b89d
Коммит
9c1dda7d7b
|
@ -819,7 +819,7 @@ support for Unicode string literals is enabled.</p>
|
|||
|
||||
<h4 id="cxx_user_literals">C++11 user-defined literals</h4>
|
||||
|
||||
<p>Use <tt>__has_feature(cxx_user_literals)</tt> to determine if support for user-defined literals is enabled. Clang does not currently support this feature.</p>
|
||||
<p>Use <tt>__has_feature(cxx_user_literals)</tt> to determine if support for user-defined literals is enabled.</p>
|
||||
|
||||
<h4 id="cxx_variadic_templates">C++11 variadic templates</h4>
|
||||
|
||||
|
|
|
@ -640,7 +640,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
|
|||
.Case("c_atomic", LangOpts.C11)
|
||||
.Case("c_generic_selections", LangOpts.C11)
|
||||
.Case("c_static_assert", LangOpts.C11)
|
||||
// C++0x features
|
||||
// C++11 features
|
||||
.Case("cxx_access_control_sfinae", LangOpts.CPlusPlus0x)
|
||||
.Case("cxx_alias_templates", LangOpts.CPlusPlus0x)
|
||||
.Case("cxx_alignas", LangOpts.CPlusPlus0x)
|
||||
|
@ -672,7 +672,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
|
|||
.Case("cxx_trailing_return", LangOpts.CPlusPlus0x)
|
||||
.Case("cxx_unicode_literals", LangOpts.CPlusPlus0x)
|
||||
.Case("cxx_unrestricted_unions", LangOpts.CPlusPlus0x)
|
||||
//.Case("cxx_user_literals", false)
|
||||
.Case("cxx_user_literals", LangOpts.CPlusPlus0x)
|
||||
.Case("cxx_variadic_templates", LangOpts.CPlusPlus0x)
|
||||
// Type traits
|
||||
.Case("has_nothrow_assign", LangOpts.CPlusPlus)
|
||||
|
|
|
@ -244,3 +244,12 @@ int no_unrestricted_unions();
|
|||
|
||||
// CHECK-0X: has_unrestricted_unions
|
||||
// CHECK-NO-0X: no_unrestricted_unions
|
||||
|
||||
#if __has_feature(cxx_user_literals)
|
||||
int has_user_literals();
|
||||
#else
|
||||
int no_user_literals();
|
||||
#endif
|
||||
|
||||
// CHECK-0X: has_user_literals
|
||||
// CHECK-NO-0X: no_user_literals
|
||||
|
|
|
@ -213,7 +213,7 @@ with clang; other versions have not been tested.</p>
|
|||
<tr>
|
||||
<td>User-defined literals</td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf">N2765</a></td>
|
||||
<td class="none" align="center">No</td>
|
||||
<td class="svn" align="center">SVN</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Standard Layout Types</td>
|
||||
|
|
Загрузка…
Ссылка в новой задаче