Commit 34d878c7 by Thomas Rodgers Committed by 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.

From-SVN: r271489
parent e1dd825b
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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment