6static_assert(std::is_signed_v<char>);
24 auto n = std::next(
map.begin());
27 CHECK(b->first ==
'a');
28 CHECK(b->second ==
"42");
34 for (
const auto& el :
map) {
39 const auto ZERO_V =
"4567854";
47 auto f =
map.find(
'\0');
49 auto n = std::next(
map.begin());
70 auto n = std::next(
map.begin());
88 CHECK(b->first ==
'a');
98 auto map3 = std::move(
map);
111 static_cast<void>(
map.contains(
'a'));
112 static_cast<void>(not
map.contains(
'b'));
113 static_cast<void>(
map.find(
'a') ==
map.begin());
114 static_cast<void>(
map.begin() !=
map.end());
115 static_cast<void>(
map.at(
'a') == 42);
116 static_cast<void>(
map.size() == 1);
118 auto b =
map.begin();
122 static_cast<void>(b != n);
123 static_cast<void>(b->second == 42);
124 static_cast<void>(n ==
e);
126 static_cast<void>(
map.begin() == --
map.end());
127 static_cast<void>(
map.lower_bound(
'a') ==
map.find(
'a'));
128 static_cast<void>(
map.upper_bound(
'a') ==
map.end());
129 for (
auto el :
map) {
130 static_cast<void>(el.first ==
'a');
131 static_cast<void>(el.second == 42);
134 const auto ZERO_V = 4567854;
136 static_cast<void>(
map.contains(
'\0'));
137 static_cast<void>(
map.at(
'a') == 42);
138 static_cast<void>(
map.at(
'\0') == ZERO_V);
139 static_cast<void>(
map.size() == 2);
141 auto b =
map.begin();
142 auto f =
map.find(
'\0');
144 auto n = std::next(
map.begin());
145 static_cast<void>(b == f);
146 static_cast<void>(b != n);
147 static_cast<void>(b->second == ZERO_V);
148 static_cast<void>(n !=
e);
150 static_cast<void>(++
map.begin() !=
map.end());
151 static_cast<void>(std::next(
map.begin(), 2) ==
map.end());
152 static_cast<void>(std::prev(
map.end(), 2) ==
map.begin());
153 static_cast<void>(std::distance(
map.begin(),
map.end()) == 2);
154 static_cast<void>(
map.upper_bound(
'\t') ==
map.find(
'a'));
157 static_cast<void>(
map.at(
'a') == 42);
160 auto b =
map.begin();
163 auto n = std::next(
map.begin());
164 static_cast<void>(f->second == 2);
165 static_cast<void>(b != n);
166 static_cast<void>(b !=
e);
167 static_cast<void>(n !=
e);
169 static_cast<void>(++
map.begin() !=
map.end());
170 static_cast<void>(std::next(
map.begin(), 3) ==
map.end());
171 static_cast<void>(std::prev(
map.end(), 3) ==
map.begin());
172 static_cast<void>(std::distance(
map.begin(),
map.end()) == 3);
175 static_cast<void>(
map == map2);
176 map3 = std::move(
map);
177 static_cast<void>(map2 == map3);
179 static_cast<void>(
map == map3);
198 auto b =
map.begin();
200 auto n = std::next(
map.begin());
203 CHECK(b->first ==
'a');
204 CHECK(b->second == 42);
210 for (
auto el :
map) {
215 const auto ZERO_V = 4567854;
222 auto b =
map.begin();
223 auto f =
map.find(
'\0');
225 auto n = std::next(
map.begin());
243 auto b =
map.begin();
246 auto n = std::next(
map.begin());
256 auto b =
map.begin();
261 CHECK(b->first == 0);
264 CHECK(b->first ==
'a');
274 auto map3 = std::move(
map);
283 std::allocator<std::pair<const char, std::string>>>
297 auto b =
map.begin();
299 auto n = std::next(
map.begin());
302 CHECK(b->first ==
'a');
303 CHECK(b->second ==
"42");
309 for (
const auto& el :
map) {
314 const auto ZERO_V =
"4567854";
321 auto b =
map.begin();
322 auto f =
map.find(
'\0');
324 auto n = std::next(
map.begin());
342 auto b =
map.begin();
345 auto n = std::next(
map.begin());
355 auto b =
map.begin();
360 CHECK(b->first == 0);
363 CHECK(b->first ==
'a');
373 auto map3 = std::move(
map);
382 std::allocator<std::pair<const char, std::string>>>
396 auto b =
map.begin();
398 auto n = std::next(
map.begin());
401 CHECK(b->first ==
'a');
402 CHECK(b->second == 42);
408 for (
auto el :
map) {
413 const auto ZERO_V = 4567854;
420 auto b =
map.begin();
421 auto f =
map.find(
'\0');
423 auto n = std::next(
map.begin());
441 auto b =
map.begin();
444 auto n = std::next(
map.begin());
454 auto b =
map.begin();
459 CHECK(b->first == 0);
462 CHECK(b->first ==
'a');
472 auto map3 = std::move(
map);
#define REQUIRE_FALSE(...)
constexpr struct kblib::nums::min_t min
constexpr auto map(F f, T &&... t) noexcept(noexcept(std::tuple{ kblib::apply(f, std::forward< T >(t))...})) -> enable_if_t< not any_void< decltype(kblib::apply(f, std::forward< T >(t)))... >, decltype(std::tuple{kblib::apply(f, std::forward< T >(t))...})>
#define KBLIB_UNUSED
This internal macro is used to provide a fallback for [[maybe_unused]] in C++14.