[pstl] Workaround more errors in the test suite
authorLouis Dionne <ldionne.2@gmail.com>
Wed, 26 May 2021 19:44:52 +0000 (15:44 -0400)
committerLouis Dionne <ldionne.2@gmail.com>
Wed, 26 May 2021 19:45:01 +0000 (15:45 -0400)
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

index 0a5fae8..2c68d28 100644 (file)
 
 // 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)
index 7b9bb12..9c6ca1e 100644 (file)
@@ -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)
index 9aec75a..f9c4538 100644 (file)
@@ -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)