From: Thomas Rodgers Date: Tue, 21 May 2019 22:15:00 +0000 (+0000) Subject: LWG 3062 - Unnecessary decay_t in is_execution_policy_v X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34d878c7bc86d42fd973ad82ed76759ad423ed88;p=gcc.git 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. From-SVN: r271489 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 804bace5e03..056e35447de 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2019-05-21 Thomas Rodgers + + 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 PR libstdc++/90252 diff --git a/libstdc++-v3/include/pstl/execution_defs.h b/libstdc++-v3/include/pstl/execution_defs.h index 1a551c7871c..34b0e3d6350 100644 --- a/libstdc++-v3/include/pstl/execution_defs.h +++ b/libstdc++-v3/include/pstl/execution_defs.h @@ -152,9 +152,15 @@ constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<_T namespace __internal { template +#if _GLIBCXX_RELEASE >= 9 +using __enable_if_execution_policy = + typename std::enable_if<__pstl::execution::is_execution_policy>::value, + _Tp>::type; +#else using __enable_if_execution_policy = typename std::enable_if<__pstl::execution::is_execution_policy::type>::value, _Tp>::type; +#endif } // namespace __internal } // namespace __pstl