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
This commit is contained in:
Thomas Rodgers 2019-05-21 22:15:00 +00:00 committed by Thomas Rodgers
parent e1dd825bad
commit 34d878c7bc
2 changed files with 12 additions and 0 deletions

View 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

View 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