mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-04 09:14:04 +08:00
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:
parent
32a1aa7095
commit
c471fb2f94
@ -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.
|
||||
|
@ -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...>;
|
||||
|
Loading…
Reference in New Issue
Block a user