LWG 3062 - Unnecessary decay_t in is_execution_policy_v
authorThomas Rodgers <trodgers@redhat.com>
Tue, 21 May 2019 22:15:00 +0000 (22:15 +0000)
committerThomas Rodgers <rodgertq@gcc.gnu.org>
Tue, 21 May 2019 22:15:00 +0000 (22:15 +0000)
    * include/pstl/execution_defs.h (__enable_if_execution_policy):
    Use std::__remove_cvref_t when building with GCC.

From-SVN: r271489

libstdc++-v3/ChangeLog
libstdc++-v3/include/pstl/execution_defs.h

index 804bace5e032dc784886d5fd81b4631fd965275b..056e35447de47bdb9b615768d5f4cc22faf7f81a 100644 (file)
@@ -1,3 +1,9 @@
+2019-05-21  Thomas Rodgers  <trodgers@redhat.com>
+
+       LWG 3062 - Unnecessary decay_t in is_execution_policy_v
+       * include/pstl/execution_defs.h (__enable_if_execution_policy):
+       Use std::__remove_cvref_t when building with GCC.
+
 2019-05-21  Jonathan Wakely  <jwakely@redhat.com>
 
        PR libstdc++/90252
index 1a551c7871c203d4a849a4d2c14e7754b4b7b6fe..34b0e3d6350af946beb33f68c2873e10360ec31b 100644 (file)
@@ -152,9 +152,15 @@ constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<_T
 namespace __internal
 {
 template <class _ExecPolicy, class _Tp>
+#if _GLIBCXX_RELEASE >= 9
+using __enable_if_execution_policy =
+    typename std::enable_if<__pstl::execution::is_execution_policy<std::__remove_cvref_t<_ExecPolicy>>::value,
+                            _Tp>::type;
+#else
 using __enable_if_execution_policy =
     typename std::enable_if<__pstl::execution::is_execution_policy<typename std::decay<_ExecPolicy>::type>::value,
                             _Tp>::type;
+#endif
 } // namespace __internal
 
 } // namespace __pstl