Commit 24223a1d authored by Nikolas Klauser's avatar Nikolas Klauser
Browse files

[libc++][PSTL] Fix nasty macros test

Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D149595
parent edce93c9
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ constexpr parallel_unsequenced_policy par_unseq{};
constexpr unsequenced_policy unseq{};

// 2.3, Execution policy type trait
template <class T>
template <class>
struct is_execution_policy : std::false_type {};

template <>
@@ -49,18 +49,18 @@ template <>
struct is_execution_policy<__pstl::execution::unsequenced_policy> : std::true_type {};

#if defined(_PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT)
template <class T>
constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<T>::value;
template <class _Tp>
constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<_Tp>::value;
#endif

} // namespace v1
} // namespace execution

namespace __internal {
template <class ExecPolicy, class T>
template <class _ExecPolicy, class _Tp>
using __enable_if_execution_policy =
    typename std::enable_if<__pstl::execution::is_execution_policy<typename std::decay<ExecPolicy>::type>::value,
                            T>::type;
    typename std::enable_if<__pstl::execution::is_execution_policy<typename std::decay<_ExecPolicy>::type>::value,
                            _Tp>::type;

template <class _IsVector>
struct __serial_tag;
+0 −3
Original line number Diff line number Diff line
@@ -9,9 +9,6 @@
// Test that headers are not tripped up by the surrounding code defining various
// alphabetic macros.

// FIXME: This should pass with the PSTL enabled
// XFAIL: with-pstl

// Prevent <ext/hash_map> from generating deprecated warnings for this test.
#if defined(__DEPRECATED)
#    undef __DEPRECATED