//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // REQUIRES: std-at-least-c++26 // // template // struct tuple_size>; // template // struct tuple_element>; // template // struct tuple_element>; // template // constexpr T get(integer_sequence) noexcept; #include #include #include #include #include void test() { // std::tuple_size_v using empty = std::integer_sequence; static_assert(std::tuple_size_v == 0); static_assert(std::tuple_size_v == 0); using size4 = std::integer_sequence; static_assert(std::tuple_size_v == 4); static_assert(std::tuple_size_v == 4); // std::tuple_element_t static_assert(std::is_same_v, int>); static_assert(std::is_same_v, int>); static_assert(std::is_same_v, int>); static_assert(std::is_same_v, int>); static_assert(std::is_same_v, int>); static_assert(std::is_same_v, int>); static_assert(std::is_same_v, int>); static_assert(std::is_same_v, int>); // std::get constexpr static size4 seq4; constexpr std::same_as decltype(auto) elt0 = get<0>(seq4); static_assert(elt0 == 9); static_assert(get<1>(seq4) == 8); static_assert(get<2>(seq4) == 7); static_assert(get<3>(seq4) == 2); static_assert(noexcept(get<0>(seq4))); }