[libcxx-commits] [PATCH] D149595: [libc++][PSTL] Fix nasty macros test
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 2 12:05:27 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG24223a1d04e4: [libc++][PSTL] Fix nasty macros test (authored by philnik).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149595/new/
https://reviews.llvm.org/D149595
Files:
libcxx/include/__pstl/internal/execution_defs.h
libcxx/test/libcxx/nasty_macros.compile.pass.cpp
Index: libcxx/test/libcxx/nasty_macros.compile.pass.cpp
===================================================================
--- libcxx/test/libcxx/nasty_macros.compile.pass.cpp
+++ 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
Index: libcxx/include/__pstl/internal/execution_defs.h
===================================================================
--- libcxx/include/__pstl/internal/execution_defs.h
+++ libcxx/include/__pstl/internal/execution_defs.h
@@ -36,7 +36,7 @@
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 @@
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149595.518821.patch
Type: text/x-patch
Size: 1930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230502/4916667c/attachment.bin>
More information about the libcxx-commits
mailing list