Features: Add cxx_user_literals.

This commit is contained in:
Stephen Kelly 2014-04-04 10:56:09 +02:00
parent e1e292cd06
commit 04c5b99f38
4 changed files with 14 additions and 0 deletions

View File

@ -122,6 +122,11 @@ The features known to this version of CMake are:
.. _N2541: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm
``cxx_user_literals``
User-defined literals, as defined in N2765_.
.. _N2765: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf
``cxx_variadic_templates``
Variadic templates, as defined in N2242_.

View File

@ -15,6 +15,7 @@ set(_cmake_feature_test_cxx_final "${GNU47_CXX11}")
set(_cmake_feature_test_cxx_noexcept "${GNU47_CXX11}")
set(_cmake_feature_test_cxx_nonstatic_member_init "${GNU47_CXX11}")
set(_cmake_feature_test_cxx_override "${GNU47_CXX11}")
set(_cmake_feature_test_cxx_user_literals "${GNU47_CXX11}")
# NOTE: C++11 was ratified in September 2011. GNU 4.7 is the first minor
# release following that (March 2012), and the first minor release to
# support -std=c++11. Prior to that, support for C++11 features is technically

View File

@ -64,6 +64,7 @@
F(cxx_static_assert) \
F(cxx_strong_enums) \
F(cxx_trailing_return_types) \
F(cxx_user_literals) \
F(cxx_variadic_templates)
class cmMakefile::Internals

View File

@ -0,0 +1,7 @@
long double operator "" _meters(long double);
void someFunc()
{
long double i = 1.2_meters;
}