P0595R2 - is_constant_evaluated
authorJakub Jelinek <jakub@redhat.com>
Wed, 12 Dec 2018 08:31:01 +0000 (09:31 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 12 Dec 2018 08:31:01 +0000 (09:31 +0100)
commit0d7924f2e766834e4fec84ff093f4c355fea6be1
tree93795a415d66bf514bcedfb5b91ef21766532313
parentcce3ae91f21f185756f604f529501810d8025f37
P0595R2 - is_constant_evaluated

P0595R2 - is_constant_evaluated
* include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED):
Define if __builtin_is_constant_evaluated is available.
* include/std/type_traits (std::is_constant_evaluated): New constexpr
inline function.
* testsuite/20_util/is_constant_evaluated/1.cc: New test.
* testsuite/20_util/is_constant_evaluated/noexcept.cc: New test.

From-SVN: r267045
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/c++config
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/is_constant_evaluated/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/is_constant_evaluated/noexcept.cc [new file with mode: 0644]