[libcxx-commits] [pstl] c4823cc - [pstl] Workaround more errors in the test suite
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 26 12:43:27 PDT 2021
Author: Louis Dionne
Date: 2021-05-26T15:45:01-04:00
New Revision: c4823cc5db69f16bb5c96cf7d1b0d070da83605e
URL: https://github.com/llvm/llvm-project/commit/c4823cc5db69f16bb5c96cf7d1b0d070da83605e
DIFF: https://github.com/llvm/llvm-project/commit/c4823cc5db69f16bb5c96cf7d1b0d070da83605e.diff
LOG: [pstl] Workaround more errors in the test suite
Added:
Modified:
pstl/include/pstl/internal/pstl_config.h
pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
Removed:
################################################################################
diff --git a/pstl/include/pstl/internal/pstl_config.h b/pstl/include/pstl/internal/pstl_config.h
index 0a5fae878e36..2c68d2872331 100644
--- a/pstl/include/pstl/internal/pstl_config.h
+++ b/pstl/include/pstl/internal/pstl_config.h
@@ -24,11 +24,7 @@
// Check the user-defined macro for warnings
#if defined(PSTL_USAGE_WARNINGS)
-# undef _PSTL_USAGE_WARNINGS
-# define _PSTL_USAGE_WARNINGS PSTL_USAGE_WARNINGS
-// Check the internal macro for warnings
-#elif !defined(_PSTL_USAGE_WARNINGS)
-# define _PSTL_USAGE_WARNINGS 0
+# define _PSTL_USAGE_WARNINGS
#endif
#if !defined(_PSTL_ASSERT)
diff --git a/pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
index 7b9bb1221ee1..9c6ca1ea8c0f 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
@@ -24,6 +24,7 @@ struct copy_int
int32_t value;
int32_t copied_times = 0;
constexpr explicit copy_int(int32_t val = 0) : value(val) {}
+ constexpr copy_int(copy_int const& other) : value(other.value), copied_times(other.copied_times) { }
constexpr copy_int&
operator=(const copy_int& other)
diff --git a/pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp b/pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
index 9aec75a9a8e0..f9c4538bf793 100644
--- a/pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
+++ b/pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
@@ -37,7 +37,7 @@ class MyClass
int32_t my_field;
MyClass() { my_field = 0; }
MyClass(int32_t in) { my_field = in; }
- MyClass(const MyClass& in) { my_field = in.my_field; }
+ MyClass(const MyClass& in) = default;
friend MyClass
operator+(const MyClass& x, const MyClass& y)
More information about the libcxx-commits
mailing list