[PATCH] Add std::is_constant_evaluated wrapper around __builtin_is_constant_evaluated

Jonathan Wakely jwakely@redhat.com
Tue Dec 11 17:01:00 GMT 2018


On 11/12/18 17:35 +0100, Jakub Jelinek wrote:
>Hi!
>
>The following patch adds std::is_constant_evaluated to the library.
>
>Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>(relies on the previously posted C++ FE patch).
>
>2018-12-11  Jakub Jelinek  <jakub@redhat.com>
>
>	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.

OK, thanks.




More information about the Libstdc++ mailing list