diff options
author | Thomas Rodgers <trodgers@redhat.com> | 2019-05-21 22:15:00 +0000 |
---|---|---|
committer | Thomas Rodgers <rodgertq@gcc.gnu.org> | 2019-05-21 22:15:00 +0000 |
commit | 34d878c7bc86d42fd973ad82ed76759ad423ed88 (patch) | |
tree | 7f36d91511b1ad74f96d33fc25423e80db293730 | |
parent | e1dd825bad0511a59d68dd07e7efff1ac1897a00 (diff) | |
download | gcc-34d878c7bc86d42fd973ad82ed76759ad423ed88.zip gcc-34d878c7bc86d42fd973ad82ed76759ad423ed88.tar.gz gcc-34d878c7bc86d42fd973ad82ed76759ad423ed88.tar.bz2 |
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
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/pstl/execution_defs.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 804bace..056e354 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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 diff --git a/libstdc++-v3/include/pstl/execution_defs.h b/libstdc++-v3/include/pstl/execution_defs.h index 1a551c7..34b0e3d 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 <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 |