]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix __invoke_r<void> to be valid in C++11
authorJonathan Wakely <jwakely@redhat.com>
Fri, 17 May 2019 09:28:17 +0000 (10:28 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 17 May 2019 09:28:17 +0000 (10:28 +0100)
* include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
in C++11.

From-SVN: r271317

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/invoke.h

index 2c119b563a512994e125624986db2bf5952789cc..2820b46167be313411b56377cf842bc254ea072c 100644 (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.
index 59e22da84d4dc0bf8c638c66b9c4b17dc3fd1658..b2e9eee1a480625d5799351c82915e569a5d78a6 100644 (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...>;