From: Jonathan Wakely Date: Fri, 17 May 2019 09:28:17 +0000 (+0100) Subject: Fix __invoke_r to be valid in C++11 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c471fb2f94a2d84fef48948699b92bc1c4832fd0;p=gcc.git Fix __invoke_r to be valid in C++11 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r): Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr in C++11. From-SVN: r271317 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2c119b563a5..2820b46167b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2019-05-17 Jonathan Wakely + * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r): + Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr + in C++11. + * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and P1165R1 entries. * doc/html/*: Regenerate. diff --git a/libstdc++-v3/include/bits/invoke.h b/libstdc++-v3/include/bits/invoke.h index 59e22da84d4..b2e9eee1a48 100644 --- a/libstdc++-v3/include/bits/invoke.h +++ b/libstdc++-v3/include/bits/invoke.h @@ -144,7 +144,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // INVOKE when R is cv void template - constexpr __can_invoke_as_void<_Res, _Callable, _Args...> + _GLIBCXX14_CONSTEXPR __can_invoke_as_void<_Res, _Callable, _Args...> __invoke_r(_Callable&& __fn, _Args&&... __args) { using __result = __invoke_result<_Callable, _Args...>;