[PATCH] Make std::invoke usable in constant expressions

Jonathan Wakely jwakely@redhat.com
Thu Oct 24 23:22:00 GMT 2019


On 23/10/19 20:28 +0100, Jonathan Wakely wrote:
>	* include/std/functional (invoke): Add constexpr for C++20.
>	* include/std/version (__cpp_lib_constexpr_invoke): Define.
>	* testsuite/20_util/function_objects/invoke/constexpr.cc: New test.
>
>This is an easy one, because I already made std::__invoke constexpr,
>so all that's needed for C++20 is to add _GLIBCXX20_CONSTEXPR to the
>public std::invoke function that calls std::__invoke.

For some reason I thought this change only affected std::invokee, but
P1065R2 affects other functions too. I'll fix those tomorrow.




More information about the Libstdc++ mailing list