Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>);
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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}};

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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}};
{
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>>;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>>;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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>;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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<>>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand All @@ -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);
Expand All @@ -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>>>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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});

Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>;

Expand Down Expand Up @@ -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}};
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -79,7 +79,7 @@ constexpr void test() {
}
}

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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "../helpers.h"

template <class Container, class Pair>
constexpr void do_insert_rv_test() {
TEST_CONSTEXPR_CXX26 void do_insert_rv_test() {
using M = Container;
using P = Pair;
using R = std::pair<typename M::iterator, bool>;
Expand Down Expand Up @@ -60,7 +60,7 @@ constexpr void do_insert_rv_test() {
}

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>;
Expand All @@ -72,7 +72,7 @@ constexpr void test() {
do_insert_rv_test<M, CP>();
}

constexpr bool test() {
TEST_CONSTEXPR_CXX26 bool test() {
test<std::vector<int>, std::vector<MoveOnly>>();
#ifndef __cpp_lib_constexpr_deque
if (!TEST_IS_CONSTANT_EVALUATED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static_assert(CanInsert<Map, Iter, std::tuple<short, double>&&>);
static_assert(!CanInsert<Map, int>);
static_assert(!CanInsert<Map, Iter, int>);

constexpr bool test() {
TEST_CONSTEXPR_CXX26 bool test() {
{
// template<class K> pair<iterator, bool> insert(P&& x);
bool transparent_used = false;
Expand Down
Loading
Loading