15static_assert(__cplusplus == 201703);
17#include <bits/stdc++.h>
48template <
typename T =
float>
58#if __cpp_deduction_guides > 201611
105template<auto n>
struct B { };
120template <
auto...
seq>
171 return [n] {
return n + 1; }();
189 struct capture_value_o {
191 auto get_value_copy() {
192 return [*
this] {
return value; };
197 auto val = mo.get_value_copy();
239 scoped_lock l1(mt[0], mt[1]);
241 scoped_lock l2(mt[0], mt[1]);
258 static_assert(is_reference_v<int&>);
261 static_assert(is_lvalue_reference_v<int&>);
264 static_assert(is_rvalue_reference_v<int&&>);
273template<
typename... Args>
274constexpr bool folding_and(Args... args) {
return (
true && ... && args); }
276template<
typename... Args>
310static_assert(__cpp_structured_bindings);
319 auto& [a0_ref, a1_ref] = a;
325 unordered_map<string, int> mapping {
331 for (
const auto& [key, value] : mapping) {
337 auto [min, max] = minmax({3, 2, 1});
358 switch (
int a = 10) {
373[[nodiscard]]
int foo() {
return 0;}
383 [[maybe_unused]]
int b =
foo();
422 enum byte_e :
unsigned char {};
423 static byte_e b { 123 };
426 static_assert(is_integral_v<int>);
427 static_assert(__cpp_hex_float);
428 double hex_double = 0x1.2p3;
429 assert(hex_double == 9.0);
431 static_assert(is_invocable<
decltype(
types_17)>::value);
432 static_assert(is_invocable<int()>::value);
433 static_assert(is_invocable_r<int, int()>::value);
434 static_assert(is_invocable_r<void, void(
int),
int>::value);
435 static_assert(negation_v<bool_constant<false>>);
437 auto inc = [](
int a) ->
int {
return a + 1; };
438 static_assert(is_invocable_r<int,
decltype(
inc),
int>::value);
439 static_assert(__cpp_lib_invoke);
440 assert(invoke(
inc, 2) == 3);
455 map<int, string> m{{1,
"mango"}, {2,
"papaya"}, {3,
"guava"}};
456 auto nh = m.extract(2);
463 set<int> src {1, 3, 5};
464 set<int> dst {2, 4, 5};
478 variant<int, float> v, w;