-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[libcxx] Minor fixes of tests for flat_[multi]{set, map} for compatibility with MSVC #170493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
|
@llvm/pr-subscribers-libcxx Author: Vojtěch Michal (vmichal) ChangesImpacts files in Change Make test code robust against evil overloads of Patch is 78.23 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/170493.diff 73 Files Affected:
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.access/at_transparent.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.access/at_transparent.pass.cpp
index 7be6fd7cba0d5..be38768097caa 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.access/at_transparent.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.access/at_transparent.pass.cpp
@@ -35,7 +35,7 @@ static_assert(!CanAt<NonTransparentMap>);
static_assert(!CanAt<const NonTransparentMap>);
template <class KeyContainer, class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
using P = std::pair<int, double>;
P ar[] = {
P(1, 1.5),
@@ -97,7 +97,7 @@ constexpr void test() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
test<std::vector<int>, std::vector<double>>();
#ifndef __cpp_lib_constexpr_deque
if (!TEST_IS_CONSTANT_EVALUATED)
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.access/index_transparent.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.access/index_transparent.pass.cpp
index 98629364654b6..5a82b1c5e0736 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.access/index_transparent.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.access/index_transparent.pass.cpp
@@ -50,7 +50,7 @@ static_assert(!CanIndex<TransparentMap, TransparentMap::iterator>);
static_assert(!CanIndex<TransparentMap, TransparentMap::const_iterator>);
template <class KeyContainer, class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
using P = std::pair<int, double>;
P ar[] = {
P(1, 1.5),
@@ -81,7 +81,7 @@ constexpr void test() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
test<std::vector<int>, std::vector<double>>();
#ifndef __cpp_lib_constexpr_deque
if (!TEST_IS_CONSTANT_EVALUATED)
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.capacity/max_size.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.capacity/max_size.pass.cpp
index ee01f8eb1dfe4..5b54e6cbe1dec 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.capacity/max_size.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.capacity/max_size.pass.cpp
@@ -24,7 +24,7 @@
#include "test_allocator.h"
#include "test_macros.h"
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
{
using A1 = limited_allocator<int, 10>;
using A2 = limited_allocator<int, 20>;
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/copy_assign.pass.cpp
index c98803f6cce9d..708fb95836f3c 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/copy_assign.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/copy_assign.pass.cpp
@@ -24,7 +24,7 @@
#include "test_allocator.h"
template <template <class...> class KeyContainer, template <class...> class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
{
// test_allocator is not propagated
using C = test_less<int>;
@@ -93,7 +93,7 @@ constexpr void test() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
test<std::vector, std::vector>();
#ifndef __cpp_lib_constexpr_deque
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/initializer_list.pass.cpp
index aea2002ba8d9c..0d1cfdaec0714 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/initializer_list.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/initializer_list.pass.cpp
@@ -36,7 +36,7 @@ struct DefaultCtableComp {
};
template <template <class...> class KeyContainer, template <class...> class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
std::pair<int, short> expected[] = {{1, 1}, {2, 2}, {3, 3}, {5, 2}};
{
// flat_map(initializer_list<value_type>);
@@ -107,7 +107,7 @@ constexpr void test() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
{
// The constructors in this subclause shall not participate in overload
// resolution unless uses_allocator_v<key_container_type, Alloc> is true
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/iter_iter.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/iter_iter.pass.cpp
index 0dce4f1993c66..8f8d74ac49d21 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/iter_iter.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/iter_iter.pass.cpp
@@ -33,7 +33,7 @@
#include "../../../test_compare.h"
template <class KeyContainer, class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
using Key = typename KeyContainer::value_type;
using Value = typename ValueContainer::value_type;
using P = std::pair<Key, Value>;
@@ -100,7 +100,7 @@ constexpr void test() {
}
template <template <class...> class KeyContainer, template <class...> class ValueContainer>
-constexpr void test_alloc() {
+TEST_CONSTEXPR_CXX26 void test_alloc() {
using P = std::pair<int, short>;
P ar[] = {{1, 1}, {1, 2}, {1, 3}, {2, 4}, {2, 5}, {3, 6}, {2, 7}, {3, 8}, {3, 9}};
@@ -178,7 +178,7 @@ constexpr void test_alloc() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
{
// The constructors in this subclause shall not participate in overload
// resolution unless uses_allocator_v<key_container_type, Alloc> is true
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/move_assign.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/move_assign.pass.cpp
index 633c73e167a88..1814f541bb4e2 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/move_assign.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/move_assign.pass.cpp
@@ -27,7 +27,7 @@
#include "min_allocator.h"
template <template <class...> class KeyContainer, template <class...> class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
{
using C = test_less<int>;
using A1 = test_allocator<int>;
@@ -72,7 +72,7 @@ constexpr void test() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
test<std::vector, std::vector>();
#ifndef __cpp_lib_constexpr_deque
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/range.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/range.pass.cpp
index 9f748738a545b..3fc8e2d746bd9 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/range.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/range.pass.cpp
@@ -69,7 +69,7 @@ static_assert(!std::is_constructible_v<Map, std::from_range_t, RangeOf<int>, std
static_assert(!std::is_constructible_v<Map, std::from_range_t, RangeOf<double>, std::less<int>, std::allocator<int>>);
template <class KeyContainer, class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
using Key = typename KeyContainer::value_type;
using Value = typename ValueContainer::value_type;
using P = std::pair<Key, Value>;
@@ -151,7 +151,7 @@ constexpr void test() {
}
template <template <class...> class KeyContainer, template <class...> class ValueContainer>
-constexpr void test_alloc() {
+TEST_CONSTEXPR_CXX26 void test_alloc() {
using P = std::pair<int, short>;
P ar[] = {{1, 1}, {1, 2}, {1, 3}, {2, 4}, {2, 5}, {3, 6}, {2, 7}, {3, 8}, {3, 9}};
{
@@ -232,7 +232,7 @@ constexpr void test_alloc() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
{
// The constructors in this subclause shall not participate in overload
// resolution unless uses_allocator_v<key_container_type, Alloc> is true
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_container.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_container.pass.cpp
index 4c583594b2501..ec4f91ade0c48 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_container.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_container.pass.cpp
@@ -35,7 +35,7 @@
#include "../../../test_compare.h"
template <template <class...> class KeyContainer, template <class...> class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
{
// flat_map(sorted_unique_t, key_container_type , mapped_container_type)
using M = std::flat_map<int, char, std::less<int>, KeyContainer<int>, ValueContainer<char>>;
@@ -141,7 +141,7 @@ constexpr void test() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
{
// The constructors in this subclause shall not participate in overload
// resolution unless uses_allocator_v<key_container_type, Alloc> is true
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_initializer_list.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_initializer_list.pass.cpp
index e8ac5d3961f7b..454e58cc187db 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_initializer_list.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_initializer_list.pass.cpp
@@ -39,7 +39,7 @@ constexpr auto il2 = il<int, short>;
constexpr auto il3 = il<short, int>;
template <template <class...> class KeyContainer, template <class...> class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
{
// flat_map(sorted_unique_t, initializer_list<value_type>);
using M = std::flat_map<int, int, std::less<int>, KeyContainer<int>, ValueContainer<int>>;
@@ -112,7 +112,7 @@ constexpr void test() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
{
// The constructors in this subclause shall not participate in overload
// resolution unless uses_allocator_v<key_container_type, Alloc> is true
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_iter_iter.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_iter_iter.pass.cpp
index f853a083e4779..da661fcf6c415 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_iter_iter.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/sorted_iter_iter.pass.cpp
@@ -31,7 +31,7 @@
#include "../../../test_compare.h"
template <class KeyContainer, class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
using Key = typename KeyContainer::value_type;
using Value = typename ValueContainer::value_type;
@@ -105,7 +105,7 @@ constexpr void test() {
}
template <template <class...> class KeyContainer, template <class...> class ValueContainer>
-constexpr void test_alloc() {
+TEST_CONSTEXPR_CXX26 void test_alloc() {
{
// flat_map(sorted_unique_t, InputIterator , InputIterator, const Allocator&)
using A1 = test_allocator<int>;
@@ -154,7 +154,7 @@ constexpr void test_alloc() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
{
// The constructors in this subclause shall not participate in overload
// resolution unless uses_allocator_v<key_container_type, Alloc> is true
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.iterators/iterator.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.iterators/iterator.pass.cpp
index eef90f4ac6bc8..7e9bf003be059 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.iterators/iterator.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.iterators/iterator.pass.cpp
@@ -30,7 +30,7 @@
#include "min_allocator.h"
template <class KeyContainer, class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
using Key = typename KeyContainer::value_type;
using Value = typename ValueContainer::value_type;
using M = std::flat_map<Key, Value, std::less<Key>, KeyContainer, ValueContainer>;
@@ -70,7 +70,7 @@ constexpr void test() {
assert(i == m.begin());
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
test<std::vector<int>, std::vector<char>>();
#ifndef __cpp_lib_constexpr_deque
if (!TEST_IS_CONSTANT_EVALUATED)
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/erase_key.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/erase_key.pass.cpp
index e4cce76b90919..457faf91d0737 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/erase_key.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/erase_key.pass.cpp
@@ -26,7 +26,7 @@
#include "min_allocator.h"
template <class KeyContainer, class ValueContainer, class Compare = std::less<>>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
using M = std::flat_map<int, char, Compare, KeyContainer, ValueContainer>;
auto make = [](std::initializer_list<int> il) {
@@ -70,7 +70,7 @@ constexpr void test() {
assert(m.empty());
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
test<std::vector<int>, std::vector<char>>();
test<std::vector<int>, std::vector<char>, std::greater<>>();
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/erase_key_transparent.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/erase_key_transparent.pass.cpp
index be660b75101dc..3c3569e96918d 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/erase_key_transparent.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/erase_key_transparent.pass.cpp
@@ -50,7 +50,7 @@ struct HeterogeneousKey {
};
template <class KeyContainer, class ValueContainer>
-constexpr void test_simple() {
+TEST_CONSTEXPR_CXX26 void test_simple() {
using Key = typename KeyContainer::value_type;
using Value = typename ValueContainer::value_type;
using M = std::flat_map<Key, Value, std::less<Key>, KeyContainer, ValueContainer>;
@@ -71,7 +71,7 @@ constexpr void test_simple() {
}
template <class KeyContainer, class ValueContainer>
-constexpr void test_transparent_comparator() {
+TEST_CONSTEXPR_CXX26 void test_transparent_comparator() {
using M = std::flat_map<std::string, int, TransparentComparator, KeyContainer, ValueContainer>;
M m = {{"alpha", 1}, {"beta", 2}, {"epsilon", 3}, {"eta", 4}, {"gamma", 5}};
ASSERT_SAME_TYPE(decltype(m.erase(Transparent<std::string>{"abc"})), typename M::size_type);
@@ -87,7 +87,7 @@ constexpr void test_transparent_comparator() {
assert(m == expected);
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
test_simple<std::vector<int>, std::vector<double>>();
test_simple<MinSequenceContainer<int>, MinSequenceContainer<double>>();
test_simple<std::vector<int, min_allocator<int>>, std::vector<double, min_allocator<double>>>();
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/extract.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/extract.pass.cpp
index 996e16aee4a6c..4a60bfc727806 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/extract.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/extract.pass.cpp
@@ -33,7 +33,7 @@ static_assert(!CanExtract<std::flat_map<int, int> const&>);
static_assert(!CanExtract<std::flat_map<int, int> const&&>);
template <class KeyContainer, class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
using M = std::flat_map<int, int, std::less<int>, KeyContainer, ValueContainer>;
M m = M({1, 2, 3}, {4, 5, 6});
@@ -49,7 +49,7 @@ constexpr void test() {
LIBCPP_ASSERT(m.values().size() == 0);
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
test<std::vector<int>, std::vector<int>>();
#ifndef __cpp_lib_constexpr_deque
if (!TEST_IS_CONSTANT_EVALUATED)
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_iter_iter.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_iter_iter.pass.cpp
index 9bcdc9c1f2b9e..5ab80d47e3533 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_iter_iter.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_iter_iter.pass.cpp
@@ -39,7 +39,7 @@ static_assert(!CanInsert<Map, int, int>);
static_assert(!CanInsert<Map, cpp20_input_iterator<Pair*>, cpp20_input_iterator<Pair*>>);
template <class KeyContainer, class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
using P = std::pair<int, double>;
using M = std::flat_map<int, double, std::less<int>, KeyContainer, ValueContainer>;
@@ -96,7 +96,7 @@ constexpr void test() {
});
}
-constexpr void test_product_iterator() {
+TEST_CONSTEXPR_CXX26 void test_product_iterator() {
using M = std::flat_map<int, int>;
{
M m1{{1, 1}, {2, 1}, {3, 1}};
@@ -116,7 +116,7 @@ constexpr void test_product_iterator() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
test<std::vector<int>, std::vector<double>>();
#ifndef __cpp_lib_constexpr_deque
if (!TEST_IS_CONSTANT_EVALUATED)
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_or_assign_transparent.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_or_assign_transparent.pass.cpp
index d036b45b958ac..66c42efd65adf 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_or_assign_transparent.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_or_assign_transparent.pass.cpp
@@ -94,7 +94,7 @@ static_assert(
!CanInsertOrAssignIter<std::flat_map<int, AssignFrom<V>, TransparentComparator>, ConvertibleTransparent<int>, V>);
template <class KeyContainer, class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
using Key = typename KeyContainer::value_type;
using Value = typename ValueContainer::value_type;
using M = std::flat_map<Key, Value, TransparentComparator, KeyContainer, ValueContainer>;
@@ -212,7 +212,7 @@ constexpr void test() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
test<std::vector<int>, std::vector<Moveable>>();
#ifndef __cpp_lib_constexpr_deque
if (!TEST_IS_CONSTANT_EVALUATED)
diff --git a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_range.pass.cpp b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_range.pass.cpp
index 88be747df6796..3d197e48ac769 100644
--- a/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_range.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.modifiers/insert_range.pass.cpp
@@ -39,7 +39,7 @@ static_assert(!CanInsertRange<Map, std::ranges::subrange<int*>>);
static_assert(!CanInsertRange<Map, std::ranges::subrange<double*>>);
template <class KeyContainer, class ValueContainer>
-constexpr void test() {
+TEST_CONSTEXPR_CXX26 void test() {
using Key = typename KeyContainer::value_type;
using Value = typename ValueContainer::value_type;
@@ -79,7 +79,7 @@ constexpr void test() {
}
}
-constexpr bool test() {
+TEST_CONSTEXPR_CXX26 bool test() {
test<std::vector<int>, std::v...
[truncated]
|
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
7b61415 to
4846f32
Compare
4846f32 to
93fb64c
Compare
ldionne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We normally don't do these kind of changes in our test suite for other implementations. We do fix things where our tests assume too much about the implementation, but when our test suite is simply "ahead" of other implementations, we'd expect other implementations to XFAIL these tests instead.
Impacts files in
test/std/containers/container.adaptors/flat.xxxChange
constexprtoTEST_CONSTEXPR_CXX26in ~70 tests. Required since MSVC hasn't implemented P2448R2 "Relaxing someconstexprrestrictions".Make test code robust against evil overloads of
operator,.(2 files)