[libcxx-commits] [libcxx] 24223a1 - [libc++][PSTL] Fix nasty macros test

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 2 12:05:20 PDT 2023


Author: Nikolas Klauser
Date: 2023-05-02T12:05:12-07:00
New Revision: 24223a1d04e469c64c7bf565cf00f2307482309a

URL: https://github.com/llvm/llvm-project/commit/24223a1d04e469c64c7bf565cf00f2307482309a
DIFF: https://github.com/llvm/llvm-project/commit/24223a1d04e469c64c7bf565cf00f2307482309a.diff

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

Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D149595

Added: 
    

Modified: 
    libcxx/include/__pstl/internal/execution_defs.h
    libcxx/test/libcxx/nasty_macros.compile.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__pstl/internal/execution_defs.h b/libcxx/include/__pstl/internal/execution_defs.h
index 14fdc6b59f26a..94b4c445652f0 100644
--- a/libcxx/include/__pstl/internal/execution_defs.h
+++ b/libcxx/include/__pstl/internal/execution_defs.h
@@ -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;

diff  --git a/libcxx/test/libcxx/nasty_macros.compile.pass.cpp b/libcxx/test/libcxx/nasty_macros.compile.pass.cpp
index e1bf1d5c17bb6..3e3e1340a7e34 100644
--- a/libcxx/test/libcxx/nasty_macros.compile.pass.cpp
+++ b/libcxx/test/libcxx/nasty_macros.compile.pass.cpp
@@ -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


        


More information about the libcxx-commits mailing list