Fix __invoke_r<void> to be valid in C++11

* include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
	Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
	in C++11.

From-SVN: r271317
This commit is contained in:
Jonathan Wakely 2019-05-17 10:28:17 +01:00 committed by Jonathan Wakely
parent 32a1aa7095
commit c471fb2f94
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2019-05-17 Jonathan Wakely <jwakely@redhat.com>
* include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
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.

View File

@ -144,7 +144,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// INVOKE<R> when R is cv void
template<typename _Res, typename _Callable, typename... _Args>
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...>;