[libcxx-commits] [libcxx] 6c75a84 - [libc++][nfc] Only test if pair is_assignable after C++03.
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 19 15:14:55 PST 2021
Author: zoecarver
Date: 2021-02-19T15:14:44-08:00
New Revision: 6c75a84ce76789d065b29e5966254e4943d7dba8
URL: https://github.com/llvm/llvm-project/commit/6c75a84ce76789d065b29e5966254e4943d7dba8
DIFF: https://github.com/llvm/llvm-project/commit/6c75a84ce76789d065b29e5966254e4943d7dba8.diff
LOG: [libc++][nfc] Only test if pair is_assignable after C++03.
In C++03 libc++ uses a different set of constructors which aren't
constrained, so these tests won't work. This should fix the bots.
Refs: 82c4701.
Added:
Modified:
libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_const_pair_U_V.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_const_pair_U_V.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_const_pair_U_V.pass.cpp
index fab9f6429088..2df3372493b3 100644
--- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_const_pair_U_V.pass.cpp
+++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_const_pair_U_V.pass.cpp
@@ -63,8 +63,6 @@ TEST_CONSTEXPR_CXX20 bool test() {
assert(p.first == 42);
assert(p.second.value == -42);
}
-#endif
-
{ // test const requirement
using T = std::pair<CopyAssignableInt, CopyAssignableInt>;
using P = std::pair<int, int>;
@@ -76,6 +74,7 @@ TEST_CONSTEXPR_CXX20 bool test() {
static_assert(!std::is_assignable<T&, P&>::value, "");
static_assert(!std::is_assignable<P&, T&>::value, "");
}
+#endif
return true;
}
More information about the libcxx-commits
mailing list