From 13fb7561338c67bd1ef74356393bb8051b26ddd4 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Sun, 8 Feb 2026 20:30:33 +0900 Subject: [PATCH 01/41] Add alloy --- .github/workflows/ci.yml | 20 +- CMakeLists.txt | 44 +- include/iris/alloy/adapt.hpp | 29 + include/iris/alloy/adapted/std_pair.hpp | 34 + include/iris/alloy/adapted/std_tuple.hpp | 52 + include/iris/alloy/detail/deduce.hpp | 46 + include/iris/alloy/detail/forward_like_t.hpp | 38 + .../alloy/detail/integer_seq_transform.hpp | 32 + include/iris/alloy/detail/pack_indexing.hpp | 84 + .../alloy/detail/preprocessed/tuple_impl.hpp | 14365 ++++++++++++++++ .../detail/preprocessed/tuple_impl.hpp.in | 26 + .../iris/alloy/detail/tuple_comparison.hpp | 74 + include/iris/alloy/detail/tuple_impl.hpp | 521 + include/iris/alloy/io.hpp | 50 + include/iris/alloy/traits.hpp | 194 + include/iris/alloy/tuple.hpp | 414 + include/iris/alloy/utility.hpp | 333 + test/CMakeLists.txt | 1 + test/alloy/CMakeLists.txt | 20 + test/alloy/alloy.cpp | 525 + 20 files changed, 16892 insertions(+), 10 deletions(-) create mode 100644 include/iris/alloy/adapt.hpp create mode 100644 include/iris/alloy/adapted/std_pair.hpp create mode 100644 include/iris/alloy/adapted/std_tuple.hpp create mode 100644 include/iris/alloy/detail/deduce.hpp create mode 100644 include/iris/alloy/detail/forward_like_t.hpp create mode 100644 include/iris/alloy/detail/integer_seq_transform.hpp create mode 100644 include/iris/alloy/detail/pack_indexing.hpp create mode 100644 include/iris/alloy/detail/preprocessed/tuple_impl.hpp create mode 100644 include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in create mode 100644 include/iris/alloy/detail/tuple_comparison.hpp create mode 100644 include/iris/alloy/detail/tuple_impl.hpp create mode 100644 include/iris/alloy/io.hpp create mode 100644 include/iris/alloy/traits.hpp create mode 100644 include/iris/alloy/tuple.hpp create mode 100644 include/iris/alloy/utility.hpp create mode 100644 test/alloy/CMakeLists.txt create mode 100644 test/alloy/alloy.cpp diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12116f7f4..9112404bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,27 +23,31 @@ jobs: changes: runs-on: ubuntu-latest outputs: - x4_component: ${{ steps.filter.outputs.changes }} + components: ${{ steps.filter.outputs.changes }} steps: - uses: actions/checkout@v5 - uses: dorny/paths-filter@v3 id: filter with: filters: | - x4: - - '.github/workflows/*.yml' - - 'modules/iris' + general: + - '.github/workflows/*.yml' - 'CMakeLists.txt' + - 'modules/iris' + - 'test/CMakeLists.txt' + alloy: + - 'include/iris/alloy/**/*' + - 'test/alloy/**/*' + x4: - 'include/iris/x4.hpp' - 'include/iris/x4/**/*' - - 'test/CMakeLists.txt' - 'test/x4/**/*' build: - name: "[${{ matrix.cpp_version.name }}] ${{ matrix.x4_component }} | ${{ matrix.compiler.toolset }}-${{ matrix.compiler.version }} (${{ matrix.build_type.name }}) @ ${{ matrix.os.name }}-${{ matrix.os.version }}" + name: "[${{ matrix.cpp_version.name }}] ${{ matrix.components }} | ${{ matrix.compiler.toolset }}-${{ matrix.compiler.version }} (${{ matrix.build_type.name }}) @ ${{ matrix.os.name }}-${{ matrix.os.version }}" needs: changes - if: ${{ needs.changes.outputs.x4_component != '[]' && needs.changes.outputs.x4_component != '' }} + if: ${{ needs.changes.outputs.components != '[]' && needs.changes.outputs.components != '' }} runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }} @@ -83,7 +87,7 @@ jobs: builder_additional_args: -- "-consoleLoggerParameters:ForceConsoleColor" executable: cl - x4_component: ${{ fromJSON(needs.changes.outputs.x4_component) }} + components: ${{ fromJSON(needs.changes.outputs.components) }} exclude: # Blacklist all invalid combinations of environments diff --git a/CMakeLists.txt b/CMakeLists.txt index 59b14af6f..a813b6633 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,8 +114,9 @@ endforeach() file( GLOB_RECURSE IRIS_X4_HEADERS - ${PROJECT_SOURCE_DIR}/include/iris/*.hpp - ${PROJECT_SOURCE_DIR}/include/iris/*.ipp + ${PROJECT_SOURCE_DIR}/include/iris/x4/*.hpp + ${PROJECT_SOURCE_DIR}/include/iris/x4/*.ipp + ${PROJECT_SOURCE_DIR}/include/iris/x4.hpp ) target_sources( @@ -130,6 +131,45 @@ target_include_directories( INTERFACE ${PROJECT_SOURCE_DIR}/include ) +# ----------------------------------------------------------------- +# Create the alloy target + +if(MSVC) + # This needs to be `OBJECT` target to set correct `/std:` flags on IDE + add_library(iris_alloy OBJECT EXCLUDE_FROM_ALL) + set_target_properties(iris_alloy PROPERTIES LINKER_LANGUAGE CXX) + + target_link_libraries(iris_alloy PUBLIC Iris::Iris) + +else() + add_library(iris_alloy INTERFACE) + target_link_libraries(iris_alloy INTERFACE Iris::Iris) +endif() + +add_library(Iris::Alloy ALIAS iris_alloy) +set_target_properties(iris_alloy PROPERTIES CXX_EXTENSIONS OFF) + +# ----------------------------------------------------------------- +# Configure alloy target + +file( + GLOB_RECURSE IRIS_ALLOY_HEADERS + ${PROJECT_SOURCE_DIR}/include/iris/alloy/*.hpp + ${PROJECT_SOURCE_DIR}/include/iris/alloy/*.ipp +) + +target_sources( + iris_alloy + PRIVATE FILE_SET HEADERS TYPE HEADERS FILES ${IRIS_ALLOY_HEADERS} +) +source_group( + TREE ${PROJECT_SOURCE_DIR}/include/iris PREFIX iris FILES ${IRIS_ALLOY_HEADERS} +) +target_include_directories( + iris_alloy + INTERFACE ${PROJECT_SOURCE_DIR}/include +) + # ----------------------------------------------------------------- # Test diff --git a/include/iris/alloy/adapt.hpp b/include/iris/alloy/adapt.hpp new file mode 100644 index 000000000..4def5267f --- /dev/null +++ b/include/iris/alloy/adapt.hpp @@ -0,0 +1,29 @@ +#ifndef IRIS_ALLOY_ADAPT_HPP +#define IRIS_ALLOY_ADAPT_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +namespace iris::alloy { + +namespace detail { + +template +struct non_type_list; + +} // detail + +template +struct adaptor; + +template +using make_getters_list = detail::non_type_list; + +} // iris::alloy + +#endif diff --git a/include/iris/alloy/adapted/std_pair.hpp b/include/iris/alloy/adapted/std_pair.hpp new file mode 100644 index 000000000..7ddef5e34 --- /dev/null +++ b/include/iris/alloy/adapted/std_pair.hpp @@ -0,0 +1,34 @@ +#ifndef IRIS_ALLOY_ADAPTED_STD_PAIR_HPP +#define IRIS_ALLOY_ADAPTED_STD_PAIR_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include + +namespace iris::alloy { + +namespace detail { + +template +struct non_type_list; + +} // detail + +template +struct adaptor; + +template +struct adaptor> +{ + using getters_list = detail::non_type_list<&std::pair::first, &std::pair::second>; +}; + +} // iris::alloy + +#endif diff --git a/include/iris/alloy/adapted/std_tuple.hpp b/include/iris/alloy/adapted/std_tuple.hpp new file mode 100644 index 000000000..ed8306e30 --- /dev/null +++ b/include/iris/alloy/adapted/std_tuple.hpp @@ -0,0 +1,52 @@ +#ifndef IRIS_ALLOY_ADAPTED_STD_TUPLE_HPP +#define IRIS_ALLOY_ADAPTED_STD_TUPLE_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include + +#include +#include + +#include + +namespace iris::alloy { + +template +struct adaptor; + +namespace detail { + +template +struct call_std_get +{ + template + static constexpr decltype(auto) operator()(Tuple&& t) + { + return std::get(static_cast(t)); + } +}; + +template +struct make_call_std_get +{ + static constexpr auto value = call_std_get{}; +}; + +} // detail + +template +struct adaptor> +{ + using getters_list = detail::integer_seq_transform_t, detail::make_call_std_get>; +}; + +} // iris::alloy + +#endif diff --git a/include/iris/alloy/detail/deduce.hpp b/include/iris/alloy/detail/deduce.hpp new file mode 100644 index 000000000..141de7976 --- /dev/null +++ b/include/iris/alloy/detail/deduce.hpp @@ -0,0 +1,46 @@ +#ifndef IRIS_ALLOY_DETAIL_DEDUCE_HPP +#define IRIS_ALLOY_DETAIL_DEDUCE_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include + +namespace iris::alloy::detail { + +template +struct deduce +{ + static_assert(std::conjunction_v, std::is_reference, + std::is_same, std::remove_reference_t>>); +}; + +template +struct deduce +{ + using type = T&; +}; + +template +struct deduce +{ + using type = T; +}; + +template +struct deduce +{ + using type = T; +}; + +template +using deduce_t = typename deduce::type; + +} // iris::alloy::detail + +#endif diff --git a/include/iris/alloy/detail/forward_like_t.hpp b/include/iris/alloy/detail/forward_like_t.hpp new file mode 100644 index 000000000..c857e71b5 --- /dev/null +++ b/include/iris/alloy/detail/forward_like_t.hpp @@ -0,0 +1,38 @@ +#ifndef IRIS_ALLOY_DETAIL_FORWARD_LIKE_T_HPP +#define IRIS_ALLOY_DETAIL_FORWARD_LIKE_T_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include + +namespace iris::alloy::detail { + +// Clang workaround; as code below does not work unless -fno-builtin-std-forward_like is specified +// ``` +// template +// using forward_like_t = decltype(std::forward_like(std::declval())); +// ``` +template +using forward_like_t = std::conditional_t< + std::is_rvalue_reference_v, + std::conditional_t< + std::is_const_v>, + std::remove_cvref_t const, + std::remove_cvref_t + >&&, + std::conditional_t< + std::is_const_v>, + std::remove_cvref_t const, + std::remove_cvref_t + >& +>; + +} // iris::alloy::detail + +#endif diff --git a/include/iris/alloy/detail/integer_seq_transform.hpp b/include/iris/alloy/detail/integer_seq_transform.hpp new file mode 100644 index 000000000..caa47bda9 --- /dev/null +++ b/include/iris/alloy/detail/integer_seq_transform.hpp @@ -0,0 +1,32 @@ +#ifndef IRIS_ALLOY_DETAIL_INTEGER_SEQ_TRANSFORM_HPP +#define IRIS_ALLOY_DETAIL_INTEGER_SEQ_TRANSFORM_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include + +namespace iris::alloy::detail { + +template +struct non_type_list; + +template class F> +struct integer_seq_transform; + +template class F> +struct integer_seq_transform, F> +{ + using type = detail::non_type_list::value...>; +}; + +template class F> +using integer_seq_transform_t = typename integer_seq_transform::type; + +} // iris::alloy::detail + +#endif diff --git a/include/iris/alloy/detail/pack_indexing.hpp b/include/iris/alloy/detail/pack_indexing.hpp new file mode 100644 index 000000000..53b7b74a2 --- /dev/null +++ b/include/iris/alloy/detail/pack_indexing.hpp @@ -0,0 +1,84 @@ +#ifndef IRIS_ALLOY_DETAIL_PACK_INDEXING_HPP +#define IRIS_ALLOY_DETAIL_PACK_INDEXING_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include + +#include + +namespace iris::alloy::detail { + +template +struct type_pack_indexing; + +template +using type_pack_indexing_t = typename type_pack_indexing::type; + +#if __cpp_pack_indexing >= 202311L + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc++26-extensions" + +template +struct type_pack_indexing +{ + using type = Ts...[I]; +}; + +#pragma clang diagnostic pop + +#else + +template +struct type_pack_indexing<0, T, Ts...> +{ + using type = T; +}; + +template +struct type_pack_indexing : type_pack_indexing {}; + +#endif + +template +struct non_type_pack_indexing; + +template +inline constexpr auto non_type_pack_indexing_v = non_type_pack_indexing::value; + +#if __cpp_pack_indexing >= 202311L + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc++26-extensions" + +template +struct non_type_pack_indexing +{ + static constexpr auto value = Vs...[I]; +}; + +#pragma clang diagnostic pop + +#else + +template +struct non_type_pack_indexing<0, V, Vs...> +{ + static constexpr auto value = V; +}; + +template +struct non_type_pack_indexing : non_type_pack_indexing {}; + +#endif + +} // iris::alloy::detail + +#endif diff --git a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp new file mode 100644 index 000000000..4926f0e4d --- /dev/null +++ b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp @@ -0,0 +1,14365 @@ +#ifndef IRIS_ALLOY_DETAIL_PREPROCESSED_TUPLE_IMPL_HPP +#define IRIS_ALLOY_DETAIL_PREPROCESSED_TUPLE_IMPL_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include + +#include +#include +#include + +#include + +#include + +#include + +namespace iris::alloy { +template +class tuple; +template + requires detail::tuple_all_elements_have_equality_operator, tuple> +constexpr bool operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); +namespace detail { +template +class tuple_impl; +template<> +class tuple_impl<> +{ + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const& a, tuple const& b) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + constexpr bool equal_to(tuple_impl const&) const noexcept { return true; } + +public: + tuple_impl() = default; + tuple_impl(tuple_impl const&) = default; + tuple_impl(tuple_impl&&) = default; + constexpr tuple_impl(value_initialize_t) noexcept {} +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const noexcept(std::conjunction_v>) + { + return _0 == other._0; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept(std::conjunction_v>) : _0{} {} + template + constexpr explicit tuple_impl(U0&& u0) noexcept(std::conjunction_v>) : _0(static_cast(u0)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) noexcept(std::conjunction_v>) : _0(other._0) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) noexcept(std::conjunction_v>) : _0(other._0) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) noexcept(std::conjunction_v>) + : _0(static_cast(other)._0) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) noexcept(std::conjunction_v>) + : _0(static_cast(other)._0) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) noexcept(std::conjunction_v>) + { + _0 = other._0; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) noexcept(std::conjunction_v>) + { + _0 = static_cast(other)._0; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) noexcept(std::conjunction_v>) + { + _0 = other._0; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) noexcept(std::conjunction_v>) + { + _0 = static_cast(other)._0; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept(std::conjunction_v>) + { + static_assert(std::conjunction_v>); + using std::swap; + swap(_0, other._0); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) + noexcept(std::conjunction_v, std::is_nothrow_default_constructible>) + : _0{}, _1{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1) noexcept(std::conjunction_v, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) noexcept(std::conjunction_v, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept(std::conjunction_v, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( + std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) + noexcept(std::conjunction_v, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) noexcept(std::conjunction_v, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( + std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( + std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( + std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( + std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( + std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( + std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( + std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( + std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert( + std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) + noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert( + std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + } + template + constexpr type_pack_indexing_t const& get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + } + template + constexpr type_pack_indexing_t const&& get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + _20 = alloy::get<20>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + IRIS_NO_UNIQUE_ADDRESS T21 _21; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), + _21(static_cast(u21)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + _20 = alloy::get<20>(static_cast(other)); + _21 = alloy::get<21>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + swap(_21, other._21); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + } + template + constexpr type_pack_indexing_t&& get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool + equal_to(tuple_impl const& other) const noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && + _22 == other._22; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + IRIS_NO_UNIQUE_ADDRESS T21 _21; + IRIS_NO_UNIQUE_ADDRESS T22 _22; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), + _21(static_cast(u21)), _22(static_cast(u22)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22) + { + } + template + constexpr explicit tuple_impl( + tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22) + { + } + template + constexpr explicit tuple_impl( + tuple_impl const&& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + return *this; + } + template + constexpr tuple_impl& + operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + _20 = alloy::get<20>(static_cast(other)); + _21 = alloy::get<21>(static_cast(other)); + _22 = alloy::get<22>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + swap(_21, other._21); + swap(_22, other._22); + } + template + constexpr type_pack_indexing_t& get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + } + template + constexpr type_pack_indexing_t&& + get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool + equal_to(tuple_impl const& other) const + noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && + _22 == other._22 && _23 == other._23; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + IRIS_NO_UNIQUE_ADDRESS T21 _21; + IRIS_NO_UNIQUE_ADDRESS T22 _22; + IRIS_NO_UNIQUE_ADDRESS T23 _23; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, + _23{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), + _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)) + { + } + template + constexpr explicit tuple_impl( + tuple_impl& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23) + { + } + template + constexpr explicit tuple_impl( + tuple_impl const& other) + noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23) + { + } + template + constexpr explicit tuple_impl( + tuple_impl&& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23) + { + } + template + constexpr explicit tuple_impl( + tuple_impl const&& other) + noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + return *this; + } + template + constexpr tuple_impl& + operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + return *this; + } + template + constexpr tuple_impl& + operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + _20 = alloy::get<20>(static_cast(other)); + _21 = alloy::get<21>(static_cast(other)); + _22 = alloy::get<22>(static_cast(other)); + _23 = alloy::get<23>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + swap(_21, other._21); + swap(_22, other._22); + swap(_23, other._23); + } + template + constexpr type_pack_indexing_t& + get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + } + template + constexpr type_pack_indexing_t&& + get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool + equal_to(tuple_impl const& other) const + noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && + _22 == other._22 && _23 == other._23 && _24 == other._24; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + IRIS_NO_UNIQUE_ADDRESS T21 _21; + IRIS_NO_UNIQUE_ADDRESS T22 _22; + IRIS_NO_UNIQUE_ADDRESS T23 _23; + IRIS_NO_UNIQUE_ADDRESS T24 _24; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, + _23{}, _24{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, + U24&& u24) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), + _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)) + { + } + template + constexpr explicit tuple_impl( + tuple_impl& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24) + { + } + template + constexpr explicit tuple_impl( + tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24) + { + } + template + constexpr explicit tuple_impl( + tuple_impl&& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24) + { + } + template + constexpr explicit tuple_impl( + tuple_impl const&& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + return *this; + } + template + constexpr tuple_impl& + operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + return *this; + } + template + constexpr tuple_impl& + operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + _20 = alloy::get<20>(static_cast(other)); + _21 = alloy::get<21>(static_cast(other)); + _22 = alloy::get<22>(static_cast(other)); + _23 = alloy::get<23>(static_cast(other)); + _24 = alloy::get<24>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable>) + { + static_assert( + std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + swap(_21, other._21); + swap(_22, other._22); + swap(_23, other._23); + swap(_24, other._24); + } + template + constexpr type_pack_indexing_t& + get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + } + template + constexpr type_pack_indexing_t&& + get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to( + tuple_impl const& other) const + noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && + _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + IRIS_NO_UNIQUE_ADDRESS T21 _21; + IRIS_NO_UNIQUE_ADDRESS T22 _22; + IRIS_NO_UNIQUE_ADDRESS T23 _23; + IRIS_NO_UNIQUE_ADDRESS T24 _24; + IRIS_NO_UNIQUE_ADDRESS T25 _25; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, + _23{}, _24{}, _25{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, + U24&& u24, U25&& u25) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), + _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)) + { + } + template + constexpr explicit tuple_impl( + tuple_impl& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25) + { + } + template + constexpr explicit tuple_impl( + tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25) + { + } + template + constexpr explicit tuple_impl( + tuple_impl&& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25) + { + } + template + constexpr explicit tuple_impl( + tuple_impl const&& other) + noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + return *this; + } + template + constexpr tuple_impl& + operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + return *this; + } + template + constexpr tuple_impl& + operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + _20 = alloy::get<20>(static_cast(other)); + _21 = alloy::get<21>(static_cast(other)); + _22 = alloy::get<22>(static_cast(other)); + _23 = alloy::get<23>(static_cast(other)); + _24 = alloy::get<24>(static_cast(other)); + _25 = alloy::get<25>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + swap(_21, other._21); + swap(_22, other._22); + swap(_23, other._23); + swap(_24, other._24); + swap(_25, other._25); + } + template + constexpr type_pack_indexing_t& + get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + } + template + constexpr type_pack_indexing_t&& + get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && + _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + IRIS_NO_UNIQUE_ADDRESS T21 _21; + IRIS_NO_UNIQUE_ADDRESS T22 _22; + IRIS_NO_UNIQUE_ADDRESS T23 _23; + IRIS_NO_UNIQUE_ADDRESS T24 _24; + IRIS_NO_UNIQUE_ADDRESS T25 _25; + IRIS_NO_UNIQUE_ADDRESS T26 _26; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, + _23{}, _24{}, _25{}, _26{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, + U24&& u24, U25&& u25, U26&& u26) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), + _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), + _26(static_cast(u26)) + { + } + template + constexpr explicit tuple_impl( + tuple_impl& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26) + { + } + template + constexpr explicit tuple_impl( + tuple_impl const& other) + noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26) + { + } + template + constexpr explicit tuple_impl( + tuple_impl&& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26) + { + } + template + constexpr explicit tuple_impl( + tuple_impl const&& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + return *this; + } + template + constexpr tuple_impl& operator=( + tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + return *this; + } + template + constexpr tuple_impl& + operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + _20 = alloy::get<20>(static_cast(other)); + _21 = alloy::get<21>(static_cast(other)); + _22 = alloy::get<22>(static_cast(other)); + _23 = alloy::get<23>(static_cast(other)); + _24 = alloy::get<24>(static_cast(other)); + _25 = alloy::get<25>(static_cast(other)); + _26 = alloy::get<26>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + swap(_21, other._21); + swap(_22, other._22); + swap(_23, other._23); + swap(_24, other._24); + swap(_25, other._25); + swap(_26, other._26); + } + template + constexpr type_pack_indexing_t& + get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + } + template + constexpr type_pack_indexing_t&& + get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && + _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26 && _27 == other._27; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + IRIS_NO_UNIQUE_ADDRESS T21 _21; + IRIS_NO_UNIQUE_ADDRESS T22 _22; + IRIS_NO_UNIQUE_ADDRESS T23 _23; + IRIS_NO_UNIQUE_ADDRESS T24 _24; + IRIS_NO_UNIQUE_ADDRESS T25 _25; + IRIS_NO_UNIQUE_ADDRESS T26 _26; + IRIS_NO_UNIQUE_ADDRESS T27 _27; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, + _23{}, _24{}, _25{}, _26{}, _27{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, + U24&& u24, U25&& u25, U26&& u26, U27&& u27) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), + _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), + _26(static_cast(u26)), _27(static_cast(u27)) + { + } + template + constexpr explicit tuple_impl( + tuple_impl& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27) + { + } + template + constexpr explicit tuple_impl( + tuple_impl&& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), + _27(static_cast(other)._27) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), + _27(static_cast(other)._27) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + _27 = other._27; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + _27 = static_cast(other)._27; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + _27 = other._27; + return *this; + } + template + constexpr tuple_impl& operator=( + tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + _27 = static_cast(other)._27; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + _20 = alloy::get<20>(static_cast(other)); + _21 = alloy::get<21>(static_cast(other)); + _22 = alloy::get<22>(static_cast(other)); + _23 = alloy::get<23>(static_cast(other)); + _24 = alloy::get<24>(static_cast(other)); + _25 = alloy::get<25>(static_cast(other)); + _26 = alloy::get<26>(static_cast(other)); + _27 = alloy::get<27>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + swap(_21, other._21); + swap(_22, other._22); + swap(_23, other._23); + swap(_24, other._24); + swap(_25, other._25); + swap(_26, other._26); + swap(_27, other._27); + } + template + constexpr type_pack_indexing_t& + get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + else if constexpr (I == 27) + return _27; + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + else if constexpr (I == 27) + return _27; + } + template + constexpr type_pack_indexing_t&& + get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + else if constexpr (I == 27) + return static_cast(_27); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + else if constexpr (I == 27) + return static_cast(_27); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && + _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26 && _27 == other._27 && _28 == other._28; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + IRIS_NO_UNIQUE_ADDRESS T21 _21; + IRIS_NO_UNIQUE_ADDRESS T22 _22; + IRIS_NO_UNIQUE_ADDRESS T23 _23; + IRIS_NO_UNIQUE_ADDRESS T24 _24; + IRIS_NO_UNIQUE_ADDRESS T25 _25; + IRIS_NO_UNIQUE_ADDRESS T26 _26; + IRIS_NO_UNIQUE_ADDRESS T27 _27; + IRIS_NO_UNIQUE_ADDRESS T28 _28; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, + _23{}, _24{}, _25{}, _26{}, _27{}, _28{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, + U24&& u24, U25&& u25, U26&& u26, U27&& u27, U28&& u28) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), + _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), + _26(static_cast(u26)), _27(static_cast(u27)), _28(static_cast(u28)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), + _28(other._28) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), + _28(other._28) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), + _27(static_cast(other)._27), _28(static_cast(other)._28) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), + _27(static_cast(other)._27), _28(static_cast(other)._28) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + _27 = other._27; + _28 = other._28; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + _27 = static_cast(other)._27; + _28 = static_cast(other)._28; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + _27 = other._27; + _28 = other._28; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + _27 = static_cast(other)._27; + _28 = static_cast(other)._28; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + _20 = alloy::get<20>(static_cast(other)); + _21 = alloy::get<21>(static_cast(other)); + _22 = alloy::get<22>(static_cast(other)); + _23 = alloy::get<23>(static_cast(other)); + _24 = alloy::get<24>(static_cast(other)); + _25 = alloy::get<25>(static_cast(other)); + _26 = alloy::get<26>(static_cast(other)); + _27 = alloy::get<27>(static_cast(other)); + _28 = alloy::get<28>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + swap(_21, other._21); + swap(_22, other._22); + swap(_23, other._23); + swap(_24, other._24); + swap(_25, other._25); + swap(_26, other._26); + swap(_27, other._27); + swap(_28, other._28); + } + template + constexpr type_pack_indexing_t& + get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + else if constexpr (I == 27) + return _27; + else if constexpr (I == 28) + return _28; + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + else if constexpr (I == 27) + return _27; + else if constexpr (I == 28) + return _28; + } + template + constexpr type_pack_indexing_t&& + get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + else if constexpr (I == 27) + return static_cast(_27); + else if constexpr (I == 28) + return static_cast(_28); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + else if constexpr (I == 27) + return static_cast(_27); + else if constexpr (I == 28) + return static_cast(_28); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && + _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26 && _27 == other._27 && _28 == other._28 && + _29 == other._29; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + IRIS_NO_UNIQUE_ADDRESS T21 _21; + IRIS_NO_UNIQUE_ADDRESS T22 _22; + IRIS_NO_UNIQUE_ADDRESS T23 _23; + IRIS_NO_UNIQUE_ADDRESS T24 _24; + IRIS_NO_UNIQUE_ADDRESS T25 _25; + IRIS_NO_UNIQUE_ADDRESS T26 _26; + IRIS_NO_UNIQUE_ADDRESS T27 _27; + IRIS_NO_UNIQUE_ADDRESS T28 _28; + IRIS_NO_UNIQUE_ADDRESS T29 _29; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, + _23{}, _24{}, _25{}, _26{}, _27{}, _28{}, _29{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, + U24&& u24, U25&& u25, U26&& u26, U27&& u27, U28&& u28, U29&& u29) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), + _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), + _26(static_cast(u26)), _27(static_cast(u27)), _28(static_cast(u28)), _29(static_cast(u29)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), + _28(other._28), _29(other._29) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), + _28(other._28), _29(other._29) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), + _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept( + std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), + _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + _27 = other._27; + _28 = other._28; + _29 = other._29; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + _27 = static_cast(other)._27; + _28 = static_cast(other)._28; + _29 = static_cast(other)._29; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + _27 = other._27; + _28 = other._28; + _29 = other._29; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + _27 = static_cast(other)._27; + _28 = static_cast(other)._28; + _29 = static_cast(other)._29; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + _20 = alloy::get<20>(static_cast(other)); + _21 = alloy::get<21>(static_cast(other)); + _22 = alloy::get<22>(static_cast(other)); + _23 = alloy::get<23>(static_cast(other)); + _24 = alloy::get<24>(static_cast(other)); + _25 = alloy::get<25>(static_cast(other)); + _26 = alloy::get<26>(static_cast(other)); + _27 = alloy::get<27>(static_cast(other)); + _28 = alloy::get<28>(static_cast(other)); + _29 = alloy::get<29>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert( + std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + swap(_21, other._21); + swap(_22, other._22); + swap(_23, other._23); + swap(_24, other._24); + swap(_25, other._25); + swap(_26, other._26); + swap(_27, other._27); + swap(_28, other._28); + swap(_29, other._29); + } + template + constexpr type_pack_indexing_t& + get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + else if constexpr (I == 27) + return _27; + else if constexpr (I == 28) + return _28; + else if constexpr (I == 29) + return _29; + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + else if constexpr (I == 27) + return _27; + else if constexpr (I == 28) + return _28; + else if constexpr (I == 29) + return _29; + } + template + constexpr type_pack_indexing_t&& + get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + else if constexpr (I == 27) + return static_cast(_27); + else if constexpr (I == 28) + return static_cast(_28); + else if constexpr (I == 29) + return static_cast(_29); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + else if constexpr (I == 27) + return static_cast(_27); + else if constexpr (I == 28) + return static_cast(_28); + else if constexpr (I == 29) + return static_cast(_29); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && + _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26 && _27 == other._27 && _28 == other._28 && + _29 == other._29 && _30 == other._30; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + IRIS_NO_UNIQUE_ADDRESS T21 _21; + IRIS_NO_UNIQUE_ADDRESS T22 _22; + IRIS_NO_UNIQUE_ADDRESS T23 _23; + IRIS_NO_UNIQUE_ADDRESS T24 _24; + IRIS_NO_UNIQUE_ADDRESS T25 _25; + IRIS_NO_UNIQUE_ADDRESS T26 _26; + IRIS_NO_UNIQUE_ADDRESS T27 _27; + IRIS_NO_UNIQUE_ADDRESS T28 _28; + IRIS_NO_UNIQUE_ADDRESS T29 _29; + IRIS_NO_UNIQUE_ADDRESS T30 _30; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t) noexcept( + std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, + _23{}, _24{}, _25{}, _26{}, _27{}, _28{}, _29{}, _30{} + { + } + template + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, + U24&& u24, U25&& u25, U26&& u26, U27&& u27, U28&& u28, U29&& u29, U30&& u30) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), + _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), + _26(static_cast(u26)), _27(static_cast(u27)), _28(static_cast(u28)), _29(static_cast(u29)), _30(static_cast(u30)) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), + _28(other._28), _29(other._29), _30(other._30) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), + _28(other._28), _29(other._29), _30(other._30) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), + _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29), + _30(static_cast(other)._30) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), + _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29), + _30(static_cast(other)._30) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + _27 = other._27; + _28 = other._28; + _29 = other._29; + _30 = other._30; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + _27 = static_cast(other)._27; + _28 = static_cast(other)._28; + _29 = static_cast(other)._29; + _30 = static_cast(other)._30; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + _27 = other._27; + _28 = other._28; + _29 = other._29; + _30 = other._30; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + _27 = static_cast(other)._27; + _28 = static_cast(other)._28; + _29 = static_cast(other)._29; + _30 = static_cast(other)._30; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + _0 = alloy::get<0>(static_cast(other)); + _1 = alloy::get<1>(static_cast(other)); + _2 = alloy::get<2>(static_cast(other)); + _3 = alloy::get<3>(static_cast(other)); + _4 = alloy::get<4>(static_cast(other)); + _5 = alloy::get<5>(static_cast(other)); + _6 = alloy::get<6>(static_cast(other)); + _7 = alloy::get<7>(static_cast(other)); + _8 = alloy::get<8>(static_cast(other)); + _9 = alloy::get<9>(static_cast(other)); + _10 = alloy::get<10>(static_cast(other)); + _11 = alloy::get<11>(static_cast(other)); + _12 = alloy::get<12>(static_cast(other)); + _13 = alloy::get<13>(static_cast(other)); + _14 = alloy::get<14>(static_cast(other)); + _15 = alloy::get<15>(static_cast(other)); + _16 = alloy::get<16>(static_cast(other)); + _17 = alloy::get<17>(static_cast(other)); + _18 = alloy::get<18>(static_cast(other)); + _19 = alloy::get<19>(static_cast(other)); + _20 = alloy::get<20>(static_cast(other)); + _21 = alloy::get<21>(static_cast(other)); + _22 = alloy::get<22>(static_cast(other)); + _23 = alloy::get<23>(static_cast(other)); + _24 = alloy::get<24>(static_cast(other)); + _25 = alloy::get<25>(static_cast(other)); + _26 = alloy::get<26>(static_cast(other)); + _27 = alloy::get<27>(static_cast(other)); + _28 = alloy::get<28>(static_cast(other)); + _29 = alloy::get<29>(static_cast(other)); + _30 = alloy::get<30>(static_cast(other)); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + swap(_21, other._21); + swap(_22, other._22); + swap(_23, other._23); + swap(_24, other._24); + swap(_25, other._25); + swap(_26, other._26); + swap(_27, other._27); + swap(_28, other._28); + swap(_29, other._29); + swap(_30, other._30); + } + template + constexpr type_pack_indexing_t& + get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + else if constexpr (I == 27) + return _27; + else if constexpr (I == 28) + return _28; + else if constexpr (I == 29) + return _29; + else if constexpr (I == 30) + return _30; + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + else if constexpr (I == 27) + return _27; + else if constexpr (I == 28) + return _28; + else if constexpr (I == 29) + return _29; + else if constexpr (I == 30) + return _30; + } + template + constexpr type_pack_indexing_t&& + get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + else if constexpr (I == 27) + return static_cast(_27); + else if constexpr (I == 28) + return static_cast(_28); + else if constexpr (I == 29) + return static_cast(_29); + else if constexpr (I == 30) + return static_cast(_30); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + else if constexpr (I == 27) + return static_cast(_27); + else if constexpr (I == 28) + return static_cast(_28); + else if constexpr (I == 29) + return static_cast(_29); + else if constexpr (I == 30) + return static_cast(_30); + } +}; +template +class tuple_impl +{ + template + friend class tuple_impl; + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const& a, tuple const& b) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr void assign(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, U13&& u13, + U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, U24&& u24, U25&& u25, + U26&& u26, U27&& u27, U28&& u28, U29&& u29, U30&& u30, U31&& u31, Us&&... us) + { + _0 = static_cast(u0); + _1 = static_cast(u1); + _2 = static_cast(u2); + _3 = static_cast(u3); + _4 = static_cast(u4); + _5 = static_cast(u5); + _6 = static_cast(u6); + _7 = static_cast(u7); + _8 = static_cast(u8); + _9 = static_cast(u9); + _10 = static_cast(u10); + _11 = static_cast(u11); + _12 = static_cast(u12); + _13 = static_cast(u13); + _14 = static_cast(u14); + _15 = static_cast(u15); + _16 = static_cast(u16); + _17 = static_cast(u17); + _18 = static_cast(u18); + _19 = static_cast(u19); + _20 = static_cast(u20); + _21 = static_cast(u21); + _22 = static_cast(u22); + _23 = static_cast(u23); + _24 = static_cast(u24); + _25 = static_cast(u25); + _26 = static_cast(u26); + _27 = static_cast(u27); + _28 = static_cast(u28); + _29 = static_cast(u29); + _30 = static_cast(u30); + _31 = static_cast(u31); + rest.assign(static_cast(us)...); + } + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept( + std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, + is_nothrow_equality_comparable, is_nothrow_equality_comparable>) + { + return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && + _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && + _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && + _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26 && _27 == other._27 && _28 == other._28 && + _29 == other._29 && _30 == other._30 && _31 == other._31 && rest == other.rest; + } + +public: + IRIS_NO_UNIQUE_ADDRESS T0 _0; + IRIS_NO_UNIQUE_ADDRESS T1 _1; + IRIS_NO_UNIQUE_ADDRESS T2 _2; + IRIS_NO_UNIQUE_ADDRESS T3 _3; + IRIS_NO_UNIQUE_ADDRESS T4 _4; + IRIS_NO_UNIQUE_ADDRESS T5 _5; + IRIS_NO_UNIQUE_ADDRESS T6 _6; + IRIS_NO_UNIQUE_ADDRESS T7 _7; + IRIS_NO_UNIQUE_ADDRESS T8 _8; + IRIS_NO_UNIQUE_ADDRESS T9 _9; + IRIS_NO_UNIQUE_ADDRESS T10 _10; + IRIS_NO_UNIQUE_ADDRESS T11 _11; + IRIS_NO_UNIQUE_ADDRESS T12 _12; + IRIS_NO_UNIQUE_ADDRESS T13 _13; + IRIS_NO_UNIQUE_ADDRESS T14 _14; + IRIS_NO_UNIQUE_ADDRESS T15 _15; + IRIS_NO_UNIQUE_ADDRESS T16 _16; + IRIS_NO_UNIQUE_ADDRESS T17 _17; + IRIS_NO_UNIQUE_ADDRESS T18 _18; + IRIS_NO_UNIQUE_ADDRESS T19 _19; + IRIS_NO_UNIQUE_ADDRESS T20 _20; + IRIS_NO_UNIQUE_ADDRESS T21 _21; + IRIS_NO_UNIQUE_ADDRESS T22 _22; + IRIS_NO_UNIQUE_ADDRESS T23 _23; + IRIS_NO_UNIQUE_ADDRESS T24 _24; + IRIS_NO_UNIQUE_ADDRESS T25 _25; + IRIS_NO_UNIQUE_ADDRESS T26 _26; + IRIS_NO_UNIQUE_ADDRESS T27 _27; + IRIS_NO_UNIQUE_ADDRESS T28 _28; + IRIS_NO_UNIQUE_ADDRESS T29 _29; + IRIS_NO_UNIQUE_ADDRESS T30 _30; + IRIS_NO_UNIQUE_ADDRESS T31 _31; + IRIS_NO_UNIQUE_ADDRESS tuple_impl rest; + explicit tuple_impl() = default; + explicit tuple_impl(tuple_impl const&) = default; + explicit tuple_impl(tuple_impl&&) = default; + constexpr explicit tuple_impl(value_initialize_t vi) + noexcept(std::conjunction_v< + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, + std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible...>) + : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, + _23{}, _24{}, _25{}, _26{}, _27{}, _28{}, _29{}, _30{}, _31{}, rest(vi) + { + } + template + requires (sizeof...(Ts) == sizeof...(Us)) + constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, + U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, + U24&& u24, U25&& u25, U26&& u26, U27&& u27, U28&& u28, U29&& u29, U30&& u30, U31&& u31, Us&&... us) + noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible...>) + : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), + _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), + _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), + _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), + _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), + _26(static_cast(u26)), _27(static_cast(u27)), _28(static_cast(u28)), _29(static_cast(u29)), _30(static_cast(u30)), + _31(static_cast(u31)), rest(static_cast(us)...) + { + } + template + constexpr explicit tuple_impl(tuple_impl& other) + noexcept( + std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible...>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), + _28(other._28), _29(other._29), _30(other._30), _31(other._31), rest(other.rest) + { + } + template + constexpr explicit tuple_impl(tuple_impl const& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible...>) + : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), + _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), + _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), + _28(other._28), _29(other._29), _30(other._30), _31(other._31), rest(other.rest) + { + } + template + constexpr explicit tuple_impl(tuple_impl&& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible...>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), + _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29), + _30(static_cast(other)._30), _31(static_cast(other)._31), rest(static_cast(other).rest) + { + } + template + constexpr explicit tuple_impl(tuple_impl const&& other) + noexcept(std::conjunction_v< + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible, + std::is_nothrow_constructible, std::is_nothrow_constructible...>) + : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), + _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), + _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), + _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), + _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), + _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), + _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), + _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), + _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), + _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29), + _30(static_cast(other)._30), _31(static_cast(other)._31), rest(static_cast(other).rest) + { + } + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, + std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable...>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + _27 = other._27; + _28 = other._28; + _29 = other._29; + _30 = other._30; + _31 = other._31; + rest = other.rest; + return *this; + } + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, + std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable...>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + _27 = static_cast(other)._27; + _28 = static_cast(other)._28; + _29 = static_cast(other)._29; + _30 = static_cast(other)._30; + _31 = static_cast(other)._31; + rest = static_cast(other).rest; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept( + std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable...>) + { + _0 = other._0; + _1 = other._1; + _2 = other._2; + _3 = other._3; + _4 = other._4; + _5 = other._5; + _6 = other._6; + _7 = other._7; + _8 = other._8; + _9 = other._9; + _10 = other._10; + _11 = other._11; + _12 = other._12; + _13 = other._13; + _14 = other._14; + _15 = other._15; + _16 = other._16; + _17 = other._17; + _18 = other._18; + _19 = other._19; + _20 = other._20; + _21 = other._21; + _22 = other._22; + _23 = other._23; + _24 = other._24; + _25 = other._25; + _26 = other._26; + _27 = other._27; + _28 = other._28; + _29 = other._29; + _30 = other._30; + _31 = other._31; + rest = other.rest; + return *this; + } + template + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, + std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable...>) + { + _0 = static_cast(other)._0; + _1 = static_cast(other)._1; + _2 = static_cast(other)._2; + _3 = static_cast(other)._3; + _4 = static_cast(other)._4; + _5 = static_cast(other)._5; + _6 = static_cast(other)._6; + _7 = static_cast(other)._7; + _8 = static_cast(other)._8; + _9 = static_cast(other)._9; + _10 = static_cast(other)._10; + _11 = static_cast(other)._11; + _12 = static_cast(other)._12; + _13 = static_cast(other)._13; + _14 = static_cast(other)._14; + _15 = static_cast(other)._15; + _16 = static_cast(other)._16; + _17 = static_cast(other)._17; + _18 = static_cast(other)._18; + _19 = static_cast(other)._19; + _20 = static_cast(other)._20; + _21 = static_cast(other)._21; + _22 = static_cast(other)._22; + _23 = static_cast(other)._23; + _24 = static_cast(other)._24; + _25 = static_cast(other)._25; + _26 = static_cast(other)._26; + _27 = static_cast(other)._27; + _28 = static_cast(other)._28; + _29 = static_cast(other)._29; + _30 = static_cast(other)._30; + _31 = static_cast(other)._31; + rest = static_cast(other).rest; + return *this; + } + template + constexpr tuple_impl& operator=(UTuple&& other) + { + [&, this](std::index_sequence) { assign(alloy::get(static_cast(other))...); }(std::index_sequence_for{}); + return *this; + } + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, + std::is_nothrow_swappable...>) + { + static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, + std::is_swappable, std::is_swappable, std::is_swappable...>); + using std::swap; + swap(_0, other._0); + swap(_1, other._1); + swap(_2, other._2); + swap(_3, other._3); + swap(_4, other._4); + swap(_5, other._5); + swap(_6, other._6); + swap(_7, other._7); + swap(_8, other._8); + swap(_9, other._9); + swap(_10, other._10); + swap(_11, other._11); + swap(_12, other._12); + swap(_13, other._13); + swap(_14, other._14); + swap(_15, other._15); + swap(_16, other._16); + swap(_17, other._17); + swap(_18, other._18); + swap(_19, other._19); + swap(_20, other._20); + swap(_21, other._21); + swap(_22, other._22); + swap(_23, other._23); + swap(_24, other._24); + swap(_25, other._25); + swap(_26, other._26); + swap(_27, other._27); + swap(_28, other._28); + swap(_29, other._29); + swap(_30, other._30); + swap(_31, other._31); + rest.swap(other.rest); + } + template + constexpr type_pack_indexing_t& + get() & noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + else if constexpr (I == 27) + return _27; + else if constexpr (I == 28) + return _28; + else if constexpr (I == 29) + return _29; + else if constexpr (I == 30) + return _30; + else if constexpr (I == 31) + return _31; + else + return rest.template get(); + } + template + constexpr type_pack_indexing_t const& + get() const& noexcept + { + if constexpr (I == 0) + return _0; + else if constexpr (I == 1) + return _1; + else if constexpr (I == 2) + return _2; + else if constexpr (I == 3) + return _3; + else if constexpr (I == 4) + return _4; + else if constexpr (I == 5) + return _5; + else if constexpr (I == 6) + return _6; + else if constexpr (I == 7) + return _7; + else if constexpr (I == 8) + return _8; + else if constexpr (I == 9) + return _9; + else if constexpr (I == 10) + return _10; + else if constexpr (I == 11) + return _11; + else if constexpr (I == 12) + return _12; + else if constexpr (I == 13) + return _13; + else if constexpr (I == 14) + return _14; + else if constexpr (I == 15) + return _15; + else if constexpr (I == 16) + return _16; + else if constexpr (I == 17) + return _17; + else if constexpr (I == 18) + return _18; + else if constexpr (I == 19) + return _19; + else if constexpr (I == 20) + return _20; + else if constexpr (I == 21) + return _21; + else if constexpr (I == 22) + return _22; + else if constexpr (I == 23) + return _23; + else if constexpr (I == 24) + return _24; + else if constexpr (I == 25) + return _25; + else if constexpr (I == 26) + return _26; + else if constexpr (I == 27) + return _27; + else if constexpr (I == 28) + return _28; + else if constexpr (I == 29) + return _29; + else if constexpr (I == 30) + return _30; + else if constexpr (I == 31) + return _31; + else + return rest.template get(); + } + template + constexpr type_pack_indexing_t&& + get() && noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + else if constexpr (I == 27) + return static_cast(_27); + else if constexpr (I == 28) + return static_cast(_28); + else if constexpr (I == 29) + return static_cast(_29); + else if constexpr (I == 30) + return static_cast(_30); + else if constexpr (I == 31) + return static_cast(_31); + else + return std::move(rest).template get(); + } + template + constexpr type_pack_indexing_t const&& + get() const&& noexcept + { + if constexpr (I == 0) + return static_cast(_0); + else if constexpr (I == 1) + return static_cast(_1); + else if constexpr (I == 2) + return static_cast(_2); + else if constexpr (I == 3) + return static_cast(_3); + else if constexpr (I == 4) + return static_cast(_4); + else if constexpr (I == 5) + return static_cast(_5); + else if constexpr (I == 6) + return static_cast(_6); + else if constexpr (I == 7) + return static_cast(_7); + else if constexpr (I == 8) + return static_cast(_8); + else if constexpr (I == 9) + return static_cast(_9); + else if constexpr (I == 10) + return static_cast(_10); + else if constexpr (I == 11) + return static_cast(_11); + else if constexpr (I == 12) + return static_cast(_12); + else if constexpr (I == 13) + return static_cast(_13); + else if constexpr (I == 14) + return static_cast(_14); + else if constexpr (I == 15) + return static_cast(_15); + else if constexpr (I == 16) + return static_cast(_16); + else if constexpr (I == 17) + return static_cast(_17); + else if constexpr (I == 18) + return static_cast(_18); + else if constexpr (I == 19) + return static_cast(_19); + else if constexpr (I == 20) + return static_cast(_20); + else if constexpr (I == 21) + return static_cast(_21); + else if constexpr (I == 22) + return static_cast(_22); + else if constexpr (I == 23) + return static_cast(_23); + else if constexpr (I == 24) + return static_cast(_24); + else if constexpr (I == 25) + return static_cast(_25); + else if constexpr (I == 26) + return static_cast(_26); + else if constexpr (I == 27) + return static_cast(_27); + else if constexpr (I == 28) + return static_cast(_28); + else if constexpr (I == 29) + return static_cast(_29); + else if constexpr (I == 30) + return static_cast(_30); + else if constexpr (I == 31) + return static_cast(_31); + else + return std::move(rest).template get(); + } +}; +} +} + +#endif diff --git a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in new file mode 100644 index 000000000..97651c3e9 --- /dev/null +++ b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in @@ -0,0 +1,26 @@ +#ifndef IRIS_ALLOY_DETAIL_PREPROCESSED_TUPLE_IMPL_HPP +#define IRIS_ALLOY_DETAIL_PREPROCESSED_TUPLE_IMPL_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include + +#include +#include +#include + +#include + +#include + +#include + +// replace me + +#endif diff --git a/include/iris/alloy/detail/tuple_comparison.hpp b/include/iris/alloy/detail/tuple_comparison.hpp new file mode 100644 index 000000000..057a8c0aa --- /dev/null +++ b/include/iris/alloy/detail/tuple_comparison.hpp @@ -0,0 +1,74 @@ +#ifndef IRIS_ALLOY_DETAIL_TUPLE_COMPARISON_HPP +#define IRIS_ALLOY_DETAIL_TUPLE_COMPARISON_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include +#include + +namespace iris::alloy { + +template +class tuple; + +namespace detail { + +template +concept boolean_testable_impl = std::convertible_to; + +template +concept boolean_testable = boolean_testable_impl && requires(T&& x) { + { !static_cast(x) } -> boolean_testable_impl; +}; + +namespace equality_operator_poison_barrier { + +bool operator==(auto, auto) = delete; // poison-pill + +template +concept has_equality_operator = requires(T&& x, U&& y) { + { static_cast(x) == static_cast(y) } -> boolean_testable; +}; + +template +struct is_nothrow_equality_comparable : std::bool_constant && noexcept(std::declval() == std::declval())> {}; + +} // equality_operator_poison_barrier + +using equality_operator_poison_barrier::has_equality_operator; +using equality_operator_poison_barrier::is_nothrow_equality_comparable; + +template +struct do_tuple_all_elements_have_equality_operator {}; + +template +struct do_tuple_all_elements_have_equality_operator, tuple> + : std::bool_constant<(has_equality_operator && ...)> {}; + +template +inline constexpr bool do_tuple_all_elements_have_equality_operator_v = do_tuple_all_elements_have_equality_operator::value; + +template +concept tuple_all_elements_have_equality_operator = do_tuple_all_elements_have_equality_operator_v; + +template +struct are_tuple_all_elements_nothrow_equality_comparable {}; + +template +struct are_tuple_all_elements_nothrow_equality_comparable, tuple> + : std::conjunction...> {}; + +template +inline constexpr bool are_tuple_all_elements_nothrow_equality_comparable_v = are_tuple_all_elements_nothrow_equality_comparable::value; + +} // detail + +} // iris::alloy + +#endif diff --git a/include/iris/alloy/detail/tuple_impl.hpp b/include/iris/alloy/detail/tuple_impl.hpp new file mode 100644 index 000000000..bca94a034 --- /dev/null +++ b/include/iris/alloy/detail/tuple_impl.hpp @@ -0,0 +1,521 @@ +#ifndef IRIS_ALLOY_DETAIL_TUPLE_IMPL_HPP +#define IRIS_ALLOY_DETAIL_TUPLE_IMPL_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef IRIS_ALLOY_GENERATE_PREPROCESSED + +#include + +#include +#include +#include + +#include + +#include + +#include + +#endif + +#include +#include +#include +#include +#include + +namespace iris::alloy { + +template +class tuple; + +template + requires detail::tuple_all_elements_have_equality_operator, tuple> +constexpr bool operator==(tuple const&, tuple const&) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +namespace detail { + +template +class tuple_impl; + +template<> +class tuple_impl<> +{ + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const& a, tuple const& b) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + constexpr bool equal_to(tuple_impl const&) const noexcept { return true; } + +public: + tuple_impl() = default; + + tuple_impl(tuple_impl const&) = default; + + tuple_impl(tuple_impl&&) = default; + + constexpr tuple_impl(value_initialize_t) noexcept {} +}; + +#define IRIS_ALLOY_TUPLE_LIMIT 32 + +#define IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_1 T +#define IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_2 U +#define IRIS_ALLOY_DETAIL_FUNCTION_PARAM_1 t +#define IRIS_ALLOY_DETAIL_FUNCTION_PARAM_2 u +#define IRIS_ALLOY_DETAIL_MEMBER_PREFIX _ + +#define IRIS_ALLOY_DETAIL_TEMPLATE_PARAMS(z, n, name) BOOST_PP_COMMA_IF(n) class BOOST_PP_CAT(name, n) +#define IRIS_ALLOY_DETAIL_ARGS(z, n, name) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(name, n) + +#define IRIS_ALLOY_DETAIL_MEM_DEFS(z, n, data) \ + IRIS_NO_UNIQUE_ADDRESS BOOST_PP_CAT(IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_1, n) BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n); + +#define IRIS_ALLOY_DETAIL_FWD_PARAMS(z, n, data) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_PP_CAT(IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_2, n) && BOOST_PP_CAT(IRIS_ALLOY_DETAIL_FUNCTION_PARAM_2, n) + +#define IRIS_ALLOY_DETAIL_FWD_INITS(z, n, data) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, \ + n)(static_cast(BOOST_PP_CAT(IRIS_ALLOY_DETAIL_FUNCTION_PARAM_2, n))) + +#define IRIS_ALLOY_DETAIL_INITS(z, n, other) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n)(other.BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n)) + +#define IRIS_ALLOY_DETAIL_NOTHROW_DEFAULT_CONSTRUCTIBLE(z, n, data) \ + BOOST_PP_COMMA_IF(n) std::is_nothrow_default_constructible + +#define IRIS_ALLOY_DETAIL_NOTHROW_CONSTRUCTIBLE(z, n, suffix) \ + BOOST_PP_COMMA_IF(n) \ + std::is_nothrow_constructible + +#define IRIS_ALLOY_DETAIL_NOTHROW_COPY_ASSIGNABLE(z, n, data) \ + BOOST_PP_COMMA_IF(n) std::is_nothrow_copy_assignable + +#define IRIS_ALLOY_DETAIL_NOTHROW_MOVE_ASSIGNABLE(z, n, data) \ + BOOST_PP_COMMA_IF(n) std::is_nothrow_move_assignable + +#define IRIS_ALLOY_DETAIL_NOTHROW_ASSIGNABLE(z, n, suffix) \ + BOOST_PP_COMMA_IF(n) \ + std::is_nothrow_assignable + +#define IRIS_ALLOY_DETAIL_VALUE_INITS(z, n, data) \ + BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n) {} + +#define IRIS_ALLOY_DETAIL_ASSIGN(z, n, other) \ + BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n) = other.BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n); + +#define IRIS_ALLOY_DETAIL_ASSIGN_ASSIGN(z, n, data) \ + BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n) = \ + static_cast(BOOST_PP_CAT(IRIS_ALLOY_DETAIL_FUNCTION_PARAM_2, n)); + +#define IRIS_ALLOY_DETAIL_ASSIGN_GET(z, n, other) \ + BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n) = alloy::get(static_cast(other)); + +#define IRIS_ALLOY_DETAIL_SWAP(z, n, other) \ + swap(BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n), other.BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n)); + +#define IRIS_ALLOY_DETAIL_SWAPPABLE(z, n, data) BOOST_PP_COMMA_IF(n) std::is_swappable + +#define IRIS_ALLOY_DETAIL_NOTHROW_SWAPPABLE(z, n, data) \ + BOOST_PP_COMMA_IF(n) std::is_nothrow_swappable + +#define IRIS_ALLOY_DETAIL_LVALUE_GET(z, n, data) \ + BOOST_PP_EXPR_IF(n, else) if constexpr (I == n) return BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n); + +#define IRIS_ALLOY_DETAIL_FORWARDING_GET(z, n, const_) \ + BOOST_PP_EXPR_IF(n, else) \ + if constexpr (I == n) return static_cast( \ + BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n)); + +#define IRIS_ALLOY_DETAIL_EQUAL_TO(z, n, other) \ + BOOST_PP_EXPR_IF(n, &&) BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n) == other.BOOST_PP_CAT(IRIS_ALLOY_DETAIL_MEMBER_PREFIX, n) + +#define IRIS_ALLOY_DETAIL_NOTHROW_EQUALITY_COMPARABLE(z, n, data) \ + BOOST_PP_COMMA_IF(n) \ + is_nothrow_equality_comparable + +#define IRIS_ALLOY_DETAIL_TUPLE_IMPL_DEF(z, n, data) \ + template \ + class tuple_impl \ + { \ + template \ + friend class tuple_impl; \ +\ + template \ + requires tuple_all_elements_have_equality_operator, tuple> \ + friend constexpr bool alloy::operator==(tuple const&, tuple const&) \ + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); \ +\ + private: \ + template \ + constexpr bool equal_to(tuple_impl const& other) const \ + noexcept(std::conjunction_v) \ + { \ + return BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_EQUAL_TO, other); \ + } \ +\ + public: \ + BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_MEM_DEFS, ) \ +\ + explicit tuple_impl() = default; \ +\ + explicit tuple_impl(tuple_impl const&) = default; \ +\ + explicit tuple_impl(tuple_impl&&) = default; \ +\ + constexpr explicit tuple_impl(value_initialize_t) \ + noexcept(std::conjunction_v) \ + : BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_VALUE_INITS, ) \ + { \ + } \ +\ + template \ + constexpr explicit tuple_impl(BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_FWD_PARAMS, )) \ + noexcept(std::conjunction_v) \ + : BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_FWD_INITS, ) \ + { \ + } \ +\ + template \ + constexpr explicit tuple_impl(tuple_impl& other) \ + noexcept(std::conjunction_v) \ + : BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_INITS, other) \ + { \ + } \ +\ + template \ + constexpr explicit tuple_impl(tuple_impl const& other) \ + noexcept(std::conjunction_v) \ + : BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_INITS, other) \ + { \ + } \ +\ + template \ + constexpr explicit tuple_impl(tuple_impl&& other) \ + noexcept(std::conjunction_v) \ + : BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_INITS, static_cast(other)) \ + { \ + } \ +\ + template \ + constexpr explicit tuple_impl( \ + tuple_impl const&& other) \ + noexcept(std::conjunction_v) \ + : BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_INITS, static_cast(other)) \ + { \ + } \ +\ + constexpr tuple_impl& operator=(tuple_impl const& other) \ + noexcept(std::conjunction_v) \ + { \ + BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_ASSIGN, other) \ + return *this; \ + } \ +\ + constexpr tuple_impl& operator=(tuple_impl&& other) \ + noexcept(std::conjunction_v) \ + { \ + BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_ASSIGN, static_cast(other)) \ + return *this; \ + } \ +\ + template \ + constexpr tuple_impl& \ + operator=(tuple_impl const& other) \ + noexcept(std::conjunction_v) \ + { \ + BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_ASSIGN, other) \ + return *this; \ + } \ +\ + template \ + constexpr tuple_impl& operator=(tuple_impl&& other) \ + noexcept(std::conjunction_v) \ + { \ + BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_ASSIGN, static_cast(other)) \ + return *this; \ + } \ +\ + template \ + constexpr tuple_impl& operator=(UTuple&& other) \ + { \ + BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_ASSIGN_GET, other) \ + return *this; \ + } \ +\ + constexpr void swap(tuple_impl& other) noexcept(std::conjunction_v) \ + { \ + static_assert(std::conjunction_v); \ + using std::swap; \ + BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_SWAP, other) \ + } \ +\ + template \ + constexpr type_pack_indexing_t& get() & noexcept \ + { \ + BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_LVALUE_GET, ) \ + } \ +\ + template \ + constexpr type_pack_indexing_t const& \ + get() const& noexcept \ + { \ + BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_LVALUE_GET, ) \ + } \ +\ + template \ + constexpr type_pack_indexing_t&& get() && noexcept \ + { \ + BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_FORWARDING_GET, ) \ + } \ +\ + template \ + constexpr type_pack_indexing_t const&& \ + get() const&& noexcept \ + { \ + BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_FORWARDING_GET, const) \ + } \ + }; + +BOOST_PP_REPEAT_FROM_TO(1, IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_TUPLE_IMPL_DEF, ) + +template +class tuple_impl +{ + template + friend class tuple_impl; + + template + requires tuple_all_elements_have_equality_operator, tuple> + friend constexpr bool alloy::operator==(tuple const& a, tuple const& b) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); + +private: + template + constexpr void assign(BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_FWD_PARAMS, ), Us&&... us) + { + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ASSIGN_ASSIGN, ) + rest.assign(static_cast(us)...); + } + + template + constexpr bool equal_to(tuple_impl const& other) const + noexcept(std::conjunction_v) \ + { + return BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_EQUAL_TO, other) && rest == other.rest; + } + +public: + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_MEM_DEFS, ) + IRIS_NO_UNIQUE_ADDRESS tuple_impl rest; + + explicit tuple_impl() = default; + + explicit tuple_impl(tuple_impl const&) = default; + + explicit tuple_impl(tuple_impl&&) = default; + + constexpr explicit tuple_impl(value_initialize_t vi) + noexcept(std::conjunction_v...>) + : BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_VALUE_INITS, ), rest(vi) + {} + + template + requires (sizeof...(Ts) == sizeof...(Us)) + constexpr explicit tuple_impl(BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_FWD_PARAMS, ), Us&&... us) + noexcept(std::conjunction_v...>) + : BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_FWD_INITS, ), rest(static_cast(us)...) + {} + + template + constexpr explicit tuple_impl( + tuple_impl& other) + noexcept(std::conjunction_v...>) + : BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_INITS, other), rest(other.rest) + {} + + template + constexpr explicit tuple_impl( + tuple_impl const& + other) noexcept(std::conjunction_v...>) + : BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_INITS, other), rest(other.rest) + {} + + template + constexpr explicit tuple_impl( + tuple_impl&& other) + noexcept(std::conjunction_v...>) + : BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_INITS, static_cast(other)), + rest(static_cast(other).rest) + {} + + template + constexpr explicit tuple_impl( + tuple_impl const&& + other) noexcept(std::conjunction_v...>) + : BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_INITS, static_cast(other)), + rest(static_cast(other).rest) + {} + + constexpr tuple_impl& operator=(tuple_impl const& other) + noexcept(std::conjunction_v...>) + { + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ASSIGN, other) + rest = other.rest; + return *this; + } + + constexpr tuple_impl& operator=(tuple_impl&& other) + noexcept(std::conjunction_v...>) + { + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ASSIGN, static_cast(other)) + rest = static_cast(other).rest; + return *this; + } + + template + constexpr tuple_impl& operator=( + tuple_impl const& other) + noexcept(std::conjunction_v...>) + { + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ASSIGN, other) + rest = other.rest; + return *this; + } + + template + constexpr tuple_impl& + operator=(tuple_impl&& other) + noexcept(std::conjunction_v...>) + { + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ASSIGN, static_cast(other)) + rest = static_cast(other).rest; + return *this; + } + + template + constexpr tuple_impl& operator=(UTuple&& other) + { + [&, this](std::index_sequence) { assign(alloy::get(static_cast(other))...); }(std::index_sequence_for{}); + return *this; + } + + constexpr void swap(tuple_impl& other) noexcept( + std::conjunction_v...>) + { + static_assert(std::conjunction_v...>); + using std::swap; + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_SWAP, other) + rest.swap(other.rest); + } + + template + constexpr type_pack_indexing_t< + I, + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ARGS, IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_1), + Ts... + >& + get() & noexcept + { + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_LVALUE_GET, ) + else return rest.template get(); + } + + template + constexpr type_pack_indexing_t< + I, + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ARGS, IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_1), + Ts... + > const& + get() const& noexcept + { + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_LVALUE_GET, ) + else return rest.template get(); + } + + template + constexpr type_pack_indexing_t< + I, + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ARGS, IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_1), + Ts... + >&& + get() && noexcept + { + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_FORWARDING_GET, ) + else return std::move(rest).template get(); + } + + template + constexpr type_pack_indexing_t< + I, + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ARGS, IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_1), + Ts... + > const&& + get() const&& noexcept + { + BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_FORWARDING_GET, const) + else return std::move(rest).template get(); + } +}; + +#undef IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_1 +#undef IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_2 +#undef IRIS_ALLOY_DETAIL_FUNCTION_PARAM_1 +#undef IRIS_ALLOY_DETAIL_FUNCTION_PARAM_2 +#undef IRIS_ALLOY_DETAIL_MEMBER_PREFIX +#undef IRIS_ALLOY_DETAIL_TEMPLATE_PARAMS +#undef IRIS_ALLOY_DETAIL_ARGS +#undef IRIS_ALLOY_DETAIL_MEM_DEFS +#undef IRIS_ALLOY_DETAIL_FWD_PARAMS +#undef IRIS_ALLOY_DETAIL_FWD_INITS +#undef IRIS_ALLOY_DETAIL_INITS +#undef IRIS_ALLOY_DETAIL_ASSIGN +#undef IRIS_ALLOY_DETAIL_ASSIGN_GET +#undef IRIS_ALLOY_DETAIL_NOTHROW_DEFAULT_CONSTRUCTIBLE +#undef IRIS_ALLOY_DETAIL_NOTHROW_CONSTRUCTIBLE +#undef IRIS_ALLOY_DETAIL_NOTHROW_COPY_ASSIGNABLE +#undef IRIS_ALLOY_DETAIL_NOTHROW_MOVE_ASSIGNABLE +#undef IRIS_ALLOY_DETAIL_NOTHROW_ASSIGNABLE +#undef IRIS_ALLOY_DETAIL_VALUE_INITS +#undef IRIS_ALLOY_DETAIL_LVALUE_GET +#undef IRIS_ALLOY_DETAIL_TUPLE_IMPL_DEF + +} // detail + +} // iris::alloy + +#endif diff --git a/include/iris/alloy/io.hpp b/include/iris/alloy/io.hpp new file mode 100644 index 000000000..13175be17 --- /dev/null +++ b/include/iris/alloy/io.hpp @@ -0,0 +1,50 @@ +#ifndef IRIS_ALLOY_IO_HPP +#define IRIS_ALLOY_IO_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include + +#include +#include + +#include + +namespace iris::alloy { + +namespace detail { + +template +struct tuple_ostream_impl; + +template +struct tuple_ostream_impl> +{ + template + static constexpr std::ostream& apply(std::ostream& os, tuple const& t) + { + os << '('; + [[maybe_unused]] bool first = true; + ((std::exchange(first, false) ? os << alloy::get(t) : os << ", " << alloy::get(t)), ...); + os << ')'; + return os; + } +}; + +} // detail + +template +std::ostream& operator<<(std::ostream& os, tuple const& t) +{ + return detail::tuple_ostream_impl>::apply(os, t); +} + +} // iris::alloy + +#endif diff --git a/include/iris/alloy/traits.hpp b/include/iris/alloy/traits.hpp new file mode 100644 index 000000000..146814811 --- /dev/null +++ b/include/iris/alloy/traits.hpp @@ -0,0 +1,194 @@ +#ifndef IRIS_ALLOY_COMMON_DEF_HPP +#define IRIS_ALLOY_COMMON_DEF_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include +#include + +#include + +#include +#include + +#include + +namespace iris::alloy { + +template +struct adaptor; + +namespace detail { + +template +struct non_type_list_size {}; + +template class TList, auto... Vs> +struct non_type_list_size> : std::integral_constant {}; + +template +struct non_type_list_indexing {}; + +template class TList, auto... Vs> +struct non_type_list_indexing> : non_type_pack_indexing {}; + +} // detail + +struct value_initialize_t {}; + +inline constexpr value_initialize_t value_initialize{}; + +template +class tuple; + +template +struct adaptor; + +namespace detail { + +template +concept PureAdapted = requires { typename adaptor::getters_list; }; + +template +concept PureTupleLike = is_ttp_specialization_of_v || PureAdapted; + +} // detail + +template +struct is_tuple_like : std::bool_constant> {}; + +template +inline constexpr bool is_tuple_like_v = is_tuple_like::value; + +template +concept Adapted = detail::PureAdapted>; + +template +concept TupleLike = detail::PureTupleLike>; + +template +struct tuple_size {}; + +template +struct tuple_size : tuple_size {}; + +template +struct tuple_size> : std::integral_constant {}; + +template +struct tuple_size : detail::non_type_list_size::getters_list> {}; + +template +inline constexpr std::size_t tuple_size_v = tuple_size::value; + +template +struct tuple_element {}; + +template +struct tuple_element> +{ + using type = detail::type_pack_indexing_t; +}; + +template +using tuple_element_t = typename tuple_element::type; + +template +[[nodiscard]] constexpr tuple_element_t>& get(tuple& t) noexcept; + +template +[[nodiscard]] constexpr tuple_element_t> const& get(tuple const& t) noexcept; + +template +[[nodiscard]] constexpr tuple_element_t>&& get(tuple&& t) noexcept; + +template +[[nodiscard]] constexpr tuple_element_t> const&& get(tuple const&& t) noexcept; + +namespace detail { + +template +inline constexpr auto getter_of = non_type_list_indexing::getters_list>::value; + +} // namespace detail + +template +[[nodiscard]] constexpr auto get(T&& x) + noexcept(std::is_nothrow_invocable_v>), T>) + -> std::invoke_result_t>), T> +{ + return std::invoke(detail::getter_of>, std::forward(x)); +} + +namespace detail { + +template +using tuple_get_t = decltype(alloy::get(std::declval())); + +template +struct is_nothrow_gettable : std::bool_constant(std::declval()))> {}; + +template +inline constexpr bool is_nothrow_gettable_v = is_nothrow_gettable::value; + +} // detail + +template +struct tuple_element +{ + // Since we only have access through getters, we don't know exact types of user-defined tuple-like types' elements. + // Threrefore, we deduce the types from what we get from getters. + using type = detail::deduce_t&>&&, detail::tuple_get_t&&>&&>; +}; + +namespace detail { + +template>> + requires is_tuple_like_v +struct is_view; + +template + requires is_tuple_like_v +struct is_view> : std::conjunction>...> {}; + +} // detail + +template +struct is_tuple_like_view : std::conjunction, detail::is_view> {}; + +template +concept TupleLikeView = TupleLike && detail::is_view>::value; + +template +inline constexpr bool is_tuple_like_view_v = is_tuple_like::value; + +namespace detail { + +template class TQual, template class UQual, class IndexSeq> +struct basic_common_reference_impl; + +template class TQual, template class UQual, std::size_t... Is> +struct basic_common_reference_impl> +{ + using type = tuple>, UQual>>...>; +}; + +} // detail + +} // iris::alloy + +template class TQual, template class UQual> + requires (iris::is_ttp_specialization_of_v || + iris::is_ttp_specialization_of_v) && + (iris::alloy::tuple_size_v == iris::alloy::tuple_size_v) +struct std::basic_common_reference + : iris::alloy::detail::basic_common_reference_impl>> {}; + +#endif diff --git a/include/iris/alloy/tuple.hpp b/include/iris/alloy/tuple.hpp new file mode 100644 index 000000000..650642f49 --- /dev/null +++ b/include/iris/alloy/tuple.hpp @@ -0,0 +1,414 @@ +#ifndef IRIS_ALLOY_TUPLE_HPP +#define IRIS_ALLOY_TUPLE_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef IRIS_USE_PREPROCESSED +#define IRIS_USE_PREPROCESSED 1 +#endif + +#if IRIS_USE_PREPROCESSED +#include +#else +#include +#endif + +#include +#include +#include +#include + +#include +#include + +#include + +namespace iris::alloy { + +namespace detail { + +template +struct type_list; + +template +struct tuple_traits_impl; + +template +struct tuple_traits_impl, UTuple, Ts...> +{ + static constexpr bool all_convertible = std::conjunction_v, Ts>...>; + static constexpr bool all_constructible = std::conjunction_v>...>; + static constexpr bool all_nothrow_constructible = std::conjunction_v>...>; + static constexpr bool all_assignable = std::conjunction_v>...>; + static constexpr bool all_nothrow_assignable = std::conjunction_v>...>; + static constexpr bool all_nothrow_gettable = std::conjunction_v...>; +#if __cpp_lib_reference_from_temporary >= 202202L + static constexpr bool any_reference_constructs_from_temporary = std::disjunction_v>...>; +#endif +}; + +template +struct tuple_traits : tuple_traits_impl, UTuple, Ts...> {}; + +template +struct tuple_one_element_is_constructible_from_tuple + : std::bool_constant<(sizeof...(Ts) == 1) && + (std::is_convertible_v> || std::is_constructible_v, UTuple>)> +{}; + +template +inline constexpr bool tuple_one_element_is_constructible_from_tuple_v = tuple_one_element_is_constructible_from_tuple::value; + +} // detail + +template +class tuple : public detail::tuple_impl +{ +private: + static_assert(!std::disjunction_v...>, "alloy::tuple must not be instantiated with rvalue reference type"); + using base_type = detail::tuple_impl; + + template + static constexpr bool disambiguating_constraint = []() { + if constexpr (sizeof...(Ts) == 1) { + return !std::is_same_v>, tuple>; + } else { + return true; + } + }(); + + struct construct_t {}; + + static constexpr construct_t construct{}; + + template + constexpr explicit tuple(construct_t, std::index_sequence, UTuple&& other) + noexcept(detail::tuple_traits::all_nothrow_gettable && detail::tuple_traits::all_nothrow_constructible) + : base_type(alloy::get(static_cast(other))...) + {} + +public: + tuple() = default; + + tuple(tuple const&) = default; + + tuple(tuple&&) + requires std::conjunction_v...> + = default; + + constexpr explicit tuple(value_initialize_t vi) + noexcept(std::conjunction_v...>) + : base_type(vi) {} + + constexpr explicit(!std::conjunction_v...>) tuple(Ts const&... ts) + noexcept(std::conjunction_v...>) + requires requires { + requires (sizeof...(Ts) > 0); + requires std::conjunction_v...>; + } + : base_type(ts...) + {} + + template + requires requires { + requires (sizeof...(Ts) == sizeof...(Us)); + requires disambiguating_constraint; + requires std::conjunction_v...>; + } +#if __cpp_lib_reference_from_temporary >= 202202L + && (!(std::reference_constructs_from_temporary_v || ...)) +#endif + constexpr explicit(!std::conjunction_v...>) tuple(Us&&... us) + noexcept(std::conjunction_v...>) + : base_type(static_cast(us)...) + {} + + template + requires requires { + requires sizeof...(Ts) == sizeof...(Us); + requires std::negation_v...>>; + requires detail::tuple_traits&, Ts...>::all_constructible; + requires (!detail::tuple_one_element_is_constructible_from_tuple_v&, Ts...>); + } +#if __cpp_lib_reference_from_temporary >= 202202L + && (!detail::tuple_traits&, Ts...>::any_reference_constructs_from_temporary) +#endif + constexpr explicit(!detail::tuple_traits&, Ts...>::all_convertible) tuple(tuple& other) + noexcept(detail::tuple_traits&, Ts...>::all_nothrow_constructible) + : base_type(other) + {} + + template + requires requires { + requires sizeof...(Ts) == sizeof...(Us); + requires std::negation_v...>>; + requires detail::tuple_traits const&, Ts...>::all_constructible; + requires (!detail::tuple_one_element_is_constructible_from_tuple_v const&, Ts...>); + } +#if __cpp_lib_reference_from_temporary >= 202202L + && (!detail::tuple_traits const&, Ts...>::any_reference_constructs_from_temporary) +#endif + constexpr explicit(!detail::tuple_traits const&, Ts...>::all_convertible) tuple(tuple const& other) + noexcept(detail::tuple_traits const&, Ts...>::all_nothrow_constructible) + : base_type(other) + {} + + template + requires requires { + requires sizeof...(Ts) == sizeof...(Us); + requires std::negation_v...>>; + requires detail::tuple_traits&&, Ts...>::all_constructible; + requires (!detail::tuple_one_element_is_constructible_from_tuple_v&&, Ts...>); + } +#if __cpp_lib_reference_from_temporary >= 202202L + && (!detail::tuple_traits&&, Ts...>::any_reference_constructs_from_temporary) +#endif + constexpr explicit(!detail::tuple_traits&&, Ts...>::all_convertible) tuple(tuple&& other) + noexcept(detail::tuple_traits&&, Ts...>::all_nothrow_constructible) + : base_type(static_cast&&>(other)) + {} + + template + requires requires { + requires sizeof...(Ts) == sizeof...(Us); + requires std::negation_v...>>; + requires detail::tuple_traits const&&, Ts...>::all_constructible; + requires (!detail::tuple_one_element_is_constructible_from_tuple_v const&&, Ts...>); + } +#if __cpp_lib_reference_from_temporary >= 202202L + && (!detail::tuple_traits const&&, Ts...>::any_reference_constructs_from_temporary) +#endif + constexpr explicit(!detail::tuple_traits const&&, Ts...>::all_convertible) tuple(tuple const&& other) + noexcept(detail::tuple_traits const&&, Ts...>::all_nothrow_constructible) + : base_type(static_cast const&&>(other)) + {} + + template + requires requires { + requires !std::is_same_v, tuple>; + requires sizeof...(Ts) == tuple_size_v>; + requires detail::tuple_traits::all_constructible; + requires !detail::tuple_one_element_is_constructible_from_tuple_v; + } +#if __cpp_lib_reference_from_temporary >= 202202L + && (!detail::tuple_traits::any_reference_constructs_from_temporary) +#endif + constexpr explicit(!detail::tuple_traits::all_convertible) tuple(UTuple&& other) + noexcept(detail::tuple_traits::all_nothrow_gettable && detail::tuple_traits::all_nothrow_constructible) + : tuple(construct, std::make_index_sequence>>{}, static_cast(other)) + {} + +#if __cpp_lib_reference_from_temporary >= 202202L + template + requires requires { + requires (sizeof...(Ts) == sizeof...(Us)); + requires disambiguating_constraint; + requires std::conjunction_v...>; + } + && (std::reference_constructs_from_temporary_v || ...) + constexpr explicit(!std::conjunction_v...>) tuple(Us&&... us) + noexcept(std::conjunction_v...>) + = delete; + + template + requires requires { + requires sizeof...(Ts) == sizeof...(Us); + requires std::negation_v...>>; + requires detail::tuple_traits&, Ts...>::all_constructible; + requires (!detail::tuple_one_element_is_constructible_from_tuple_v&, Ts...>); + } + && detail::tuple_traits&, Ts...>::any_reference_constructs_from_temporary + constexpr explicit(!detail::tuple_traits&, Ts...>::all_convertible) tuple(tuple& other) + noexcept(detail::tuple_traits&, Ts...>::all_nothrow_constructible) + = delete; + + template + requires requires { + requires sizeof...(Ts) == sizeof...(Us); + requires std::negation_v...>>; + requires detail::tuple_traits const&, Ts...>::all_constructible; + requires (!detail::tuple_one_element_is_constructible_from_tuple_v const&, Ts...>); + } + && detail::tuple_traits const&, Ts...>::any_reference_constructs_from_temporary + constexpr explicit(!detail::tuple_traits const&, Ts...>::all_convertible) tuple(tuple const& other) + noexcept(detail::tuple_traits const&, Ts...>::all_nothrow_constructible) + = delete; + + template + requires requires { + requires sizeof...(Ts) == sizeof...(Us); + requires std::negation_v...>>; + requires detail::tuple_traits&&, Ts...>::all_constructible; + requires (!detail::tuple_one_element_is_constructible_from_tuple_v&&, Ts...>); + } + && detail::tuple_traits&&, Ts...>::any_reference_constructs_from_temporary + constexpr explicit(!detail::tuple_traits&&, Ts...>::all_convertible) tuple(tuple&& other) + noexcept(detail::tuple_traits&&, Ts...>::all_nothrow_constructible) + = delete; + + template + requires requires { + requires sizeof...(Ts) == sizeof...(Us); + requires std::negation_v...>>; + requires detail::tuple_traits const&&, Ts...>::all_constructible; + requires (!detail::tuple_one_element_is_constructible_from_tuple_v const&&, Ts...>); + } + && detail::tuple_traits const&&, Ts...>::any_reference_constructs_from_temporary + constexpr explicit(!detail::tuple_traits const&&, Ts...>::all_convertible) tuple(tuple const&& other) + noexcept(detail::tuple_traits const&&, Ts...>::all_nothrow_constructible) + = delete; + + template + requires requires { + requires !std::is_same_v, tuple>; + requires sizeof...(Ts) == tuple_size_v>; + requires detail::tuple_traits::all_constructible; + requires !detail::tuple_one_element_is_constructible_from_tuple_v; + } + && detail::tuple_traits::any_reference_constructs_from_temporary + constexpr explicit(!detail::tuple_traits::all_convertible) tuple(UTuple&& other) + noexcept(detail::tuple_traits::all_nothrow_gettable && detail::tuple_traits::all_nothrow_constructible) + = delete; +#endif + + constexpr tuple& operator=(tuple const& other) + noexcept(std::conjunction_v...>) + { + base_type::operator=(other); + return *this; + + } + constexpr tuple& operator=(tuple&& other) + noexcept(std::conjunction_v...>) + requires std::conjunction_v...> + { + base_type::operator=(static_cast(other)); + return *this; + } + + template + requires requires { + requires sizeof...(Ts) == sizeof...(Us); + requires detail::tuple_traits const&, Ts...>::all_assignable; + } + constexpr tuple& operator=(tuple const& other) + noexcept(detail::tuple_traits const&, Ts...>::all_nothrow_assignable) + { + base_type::operator=(other); + return *this; + } + + template + requires requires { + requires sizeof...(Ts) == sizeof...(Us); + requires detail::tuple_traits&&, Ts...>::all_assignable; + } + constexpr tuple& operator=(tuple&& other) + noexcept(detail::tuple_traits&&, Ts...>::all_nothrow_assignable) + { + base_type::operator=(other); + return *this; + } + + template + requires requires { + requires !std::is_same_v, tuple>; + requires sizeof...(Ts) == tuple_size_v>; + requires detail::tuple_traits::all_assignable; + } + constexpr tuple& operator=(UTuple&& other) + noexcept(detail::tuple_traits::all_nothrow_assignable) + { + base_type::operator=(static_cast(other)); + return *this; + } + + constexpr void swap(tuple& other) noexcept(std::conjunction_v...>) + { + base_type::swap(other); + } + + template + [[nodiscard]] constexpr tuple_element_t& get() & noexcept + { + static_assert(I < sizeof...(Ts)); + return base_type::template get(); + } + + template + [[nodiscard]] constexpr tuple_element_t const& get() const& noexcept + { + static_assert(I < sizeof...(Ts)); + return base_type::template get(); + } + + template + [[nodiscard]] constexpr tuple_element_t&& get() && noexcept + { + static_assert(I < sizeof...(Ts)); + return std::move(*this).base_type::template get(); + } + + template + [[nodiscard]] constexpr tuple_element_t const&& get() const&& noexcept + { + static_assert(I < sizeof...(Ts)); + return std::move(*this).base_type::template get(); + } +}; + +template +tuple(Ts...) -> tuple; + +template + requires std::conjunction_v...> +constexpr void swap(tuple& a, tuple& b) noexcept(noexcept(a.swap(b))) +{ + a.swap(b); +} + +template + requires detail::tuple_all_elements_have_equality_operator, tuple> +constexpr bool operator==(tuple const& a, tuple const& b) + noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>) +{ + return a.equal_to(b); +} + +template +[[nodiscard]] constexpr tuple_element_t>& get(tuple& t) noexcept +{ + static_assert(I < sizeof...(Ts)); + return t.template get(); +} + +template +[[nodiscard]] constexpr tuple_element_t> const& get(tuple const& t) noexcept +{ + static_assert(I < sizeof...(Ts)); + return t.template get(); +} + +template +[[nodiscard]] constexpr tuple_element_t>&& get(tuple&& t) noexcept +{ + static_assert(I < sizeof...(Ts)); + return static_cast&&>(t).template get(); +} + +template +[[nodiscard]] constexpr tuple_element_t> const&& get(tuple const&& t) noexcept +{ + static_assert(I < sizeof...(Ts)); + return static_cast const&&>(t).template get(); +} + +} // iris::alloy + +#endif diff --git a/include/iris/alloy/utility.hpp b/include/iris/alloy/utility.hpp new file mode 100644 index 000000000..90dd8cc8d --- /dev/null +++ b/include/iris/alloy/utility.hpp @@ -0,0 +1,333 @@ +#ifndef IRIS_ALLOY_UTILITY_HPP +#define IRIS_ALLOY_UTILITY_HPP + +/*============================================================================= + Copyright (c) 2025 Yaito Kakeyama + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include +#include + +#include +#include +#include + +#include + +namespace iris::alloy { + +namespace detail { + +template +struct type_list; + +template +struct tuple_cat_result_impl; + +template +struct tuple_cat_result_impl, type_list<>> +{ + using type = tuple; +}; + +template +struct tuple_cat_result_impl, type_list, IndexSeqs...>, Tuple, Tuples...> + : tuple_cat_result_impl>...>, type_list, Tuples...> {}; + +template +struct tuple_cat_result : tuple_cat_result_impl, type_list>>...>, Tuples...> {}; + +template +struct tuple_cat_impl_base; + +template +struct tuple_cat_impl_base> +{ + template + static constexpr bool nothrow = std::is_nothrow_constructible_v; + + template + static constexpr ResultTuple apply(Args&&... args) noexcept(nothrow) + { + return ResultTuple(std::forward(args)...); + } +}; + +template +struct tuple_cat_impl_base, IndexSeqs...>, Tuple, Tuples...> +{ + template + static constexpr bool nothrow = + tuple_cat_impl_base, Tuples...>::template nothrow && (is_nothrow_gettable_v && ...); + + template + static constexpr ResultTuple apply(Tuple&& tuple, Tuples&&... tuples, Args&&... args) noexcept(nothrow) + { + return tuple_cat_impl_base, Tuples...>::apply(std::forward(tuples)..., std::forward(args)..., + alloy::get(std::forward(tuple))...); + } +}; + +template +struct tuple_cat_impl +{ + using Base = tuple_cat_impl_base::type, + detail::type_list>>...>, Tuples...>; + + static constexpr bool nothrow = Base::template nothrow<>; + + static constexpr typename tuple_cat_result::type apply(Tuples&&... tuples) noexcept(nothrow) + { + return Base::apply(std::forward(tuples)...); + } +}; + +template +struct index_sequence_split_impl; + +template + requires (sizeof...(Is) < N) +struct index_sequence_split_impl, std::index_sequence> + : index_sequence_split_impl, std::index_sequence> {}; + +template + requires (sizeof...(Is) == N) +struct index_sequence_split_impl, std::index_sequence> +{ + using head = std::index_sequence; + using tail = std::index_sequence; +}; + +template +struct index_sequence_split : index_sequence_split_impl, IndexSeq> {}; + +template +struct index_sequence_take +{ + using type = typename index_sequence_split::head; +}; + +template +using index_sequence_take_t = typename index_sequence_take::type; + +template +struct index_sequence_drop +{ + using type = typename index_sequence_split::tail; +}; + +template +using index_sequence_drop_t = typename index_sequence_drop::type; + +template +struct index_sequence_subrange +{ + using type = index_sequence_take_t>; +}; + +template +using index_sequence_subrange_t = typename index_sequence_subrange::type; + +template +struct index_sequence_sum; + +template +struct index_sequence_sum> : std::integral_constant {}; + +template +inline constexpr std::size_t index_sequence_sum_v = index_sequence_sum::value; + +template +struct index_sequence_cumulative_sum_impl; + +template +struct index_sequence_cumulative_sum_impl, ValIndexSeq> +{ + using type = std::index_sequence<0, index_sequence_sum_v>...>; +}; + +template +struct index_sequence_cumulative_sum; + +template +struct index_sequence_cumulative_sum> + : index_sequence_cumulative_sum_impl, std::index_sequence> {}; + +template +using index_sequence_cumulative_sum_t = typename index_sequence_cumulative_sum::type; + +template +struct index_sequence_segment_impl; + +template +struct index_sequence_segment_impl, std::index_sequence> +{ + using type = type_list...>; +}; + +template +struct index_sequence_segment; + +template +struct index_sequence_segment, Sizes...> +{ + using CumSumIndexSeq = index_sequence_cumulative_sum_t>; + + using type = typename index_sequence_segment_impl, index_sequence_take_t, + index_sequence_drop_t<1, CumSumIndexSeq>>::type; +}; + +template +using index_sequence_segment_t = typename index_sequence_segment::type; + +template +struct tuple_from_tuple_and_index_sequence; + +template +struct tuple_from_tuple_and_index_sequence> +{ + using type = tuple>...>; +}; + +template +using tuple_from_tuple_and_index_sequence_t = typename tuple_from_tuple_and_index_sequence::type; + +template +struct tuple_split_result_impl; + +template +struct tuple_split_result_impl> +{ + using type = tuple...>; +}; + +template +struct tuple_split_result +{ + using type = typename tuple_split_result_impl>>, Sizes...>>::type; +}; + +template +struct tuple_split_make_inner; + +template +struct tuple_split_make_inner> +{ + static constexpr bool nothrow = std::conjunction_v< + is_nothrow_gettable..., + std::is_nothrow_constructible...> + >; + + static constexpr ResultInnerTuple apply(Tuple&& t) noexcept(nothrow) + { + return ResultInnerTuple(alloy::get(std::forward(t))...); + } +}; + +template +struct tuple_split_make_outer; + +template +struct tuple_split_make_outer, Tuple, type_list> +{ + static constexpr bool nothrow = (tuple_split_make_inner::nothrow && ...); + + static constexpr tuple apply(Tuple&& t) noexcept(nothrow) + { + return tuple(tuple_split_make_inner::apply(std::forward(t))...); + } +}; + +template +struct tuple_split_impl : tuple_split_make_outer::type, Tuple, + index_sequence_segment_t>>, Sizes...>> {}; + +template>>> +struct tuple_assign_impl; + +template +struct tuple_assign_impl> +{ + static constexpr bool nothrow = std::conjunction_v, is_nothrow_gettable>..., + std::is_nothrow_assignable, tuple_get_t>...>; + + static constexpr void apply(From&& from, To&& to) noexcept(nothrow) + { + ((void)(alloy::get(std::forward(to)) = alloy::get(std::forward(from))), ...); + } +}; + +template +struct tuple_ref_result_impl; + +template +struct tuple_ref_result_impl> +{ + using type = tuple&...>; +}; + +template +struct tuple_ref_result : tuple_ref_result_impl>> {}; + +template +struct for_each_impl; + +template +struct for_each_impl> +{ + template + static constexpr void apply(Tuple&& t, F&& f){ + ((void)std::invoke(std::forward(f), alloy::get(std::forward(t))), ...); + } +}; + +} // detail + +template +using tuple_cat_t = typename detail::tuple_cat_result::type; + +template +using tuple_split_t = typename detail::tuple_split_result::type; + +template +using tuple_ref_t = typename detail::tuple_ref_result::type; + +template +[[nodiscard]] constexpr tuple_cat_t tuple_cat(Tuples&&... tuples) noexcept(detail::tuple_cat_impl::nothrow) +{ + return detail::tuple_cat_impl::apply(std::forward(tuples)...); +} + +template +[[nodiscard]] constexpr tuple_split_t tuple_split(Tuple&& t) noexcept(detail::tuple_split_impl::nothrow) +{ + static_assert((0 + ... + Sizes) == tuple_size_v>); + return detail::tuple_split_impl::apply(std::forward(t)); +} + +template +constexpr void tuple_assign(From&& from, To&& to) noexcept(detail::tuple_assign_impl::nothrow) +{ + static_assert(tuple_size_v> == tuple_size_v>); + detail::tuple_assign_impl::apply(std::forward(from), std::forward(to)); +} + +template +[[nodiscard]] constexpr tuple_ref_t tuple_ref(Tuple& t) noexcept(std::is_nothrow_constructible_v, Tuple&>) +{ + return tuple_ref_t(t); +} + +template +constexpr void for_each(Tuple&& t, F&& f) +{ + return detail::for_each_impl>>>::apply(std::forward(t), std::forward(f)); +} + +} // iris::alloy + +#endif diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 52344c86a..c8bfafd2a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,5 +5,6 @@ # https://www.boost.org/LICENSE_1_0.txt if(PROJECT_IS_TOP_LEVEL) + add_subdirectory(alloy) add_subdirectory(x4) endif() diff --git a/test/alloy/CMakeLists.txt b/test/alloy/CMakeLists.txt new file mode 100644 index 000000000..9099e526d --- /dev/null +++ b/test/alloy/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright 2026 The Iris Project Contributors +# +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt + +function(alloy_define_test test_name) + iris_define_test(alloy_${test_name} ${ARGN}) + target_link_libraries(alloy_${test_name}_test PRIVATE Iris::Alloy) + set_target_properties(alloy_${test_name}_test PROPERTIES FOLDER "test/alloy") +endfunction() + +function(alloy_define_tests) + foreach(test_name IN LISTS ARGV) + alloy_define_test(${test_name} ${test_name}.cpp) + endforeach() +endfunction() + +alloy_define_tests( + alloy +) diff --git a/test/alloy/alloy.cpp b/test/alloy/alloy.cpp new file mode 100644 index 000000000..f77af11f7 --- /dev/null +++ b/test/alloy/alloy.cpp @@ -0,0 +1,525 @@ +/*============================================================================= + Copyright (c) 2026 The Iris Project Contributors + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include + +#include +#include + +#include +#include +#include +#include + + +namespace alloy = iris::alloy; + +struct NonAdaptedStruct +{}; + +struct AdaptedStruct +{ + int x; + double y; +}; + +template<> +struct alloy::adaptor +{ + using getters_list = make_getters_list<&AdaptedStruct::x, &AdaptedStruct::y>; +}; + +struct OldStyle +{ + int i; + std::string str; + int get_int() const { return i; } + std::string const& get_string() const { return str; } +}; + +template<> +struct alloy::adaptor +{ + using getters_list = make_getters_list<&OldStyle::get_int, &OldStyle::get_string>; +}; + +template +using alloy_get_t = decltype(alloy::get(std::declval())); + +namespace { + +void swap() = delete; // poison-pill + +} + +TEST_CASE("adapt_struct") +{ + + { + STATIC_CHECK(!alloy::TupleLike); + } + + { + STATIC_CHECK(alloy::TupleLike); + + STATIC_CHECK(alloy::tuple_size_v == 2); + + STATIC_CHECK(std::is_same_v, int&>); + STATIC_CHECK(std::is_same_v, int const&>); + STATIC_CHECK(std::is_same_v, int&&>); + STATIC_CHECK(std::is_same_v, int const&&>); + + STATIC_CHECK(std::is_same_v, double&>); + STATIC_CHECK(std::is_same_v, double const&>); + STATIC_CHECK(std::is_same_v, double&&>); + STATIC_CHECK(std::is_same_v, double const&&>); + + constexpr AdaptedStruct a{42, 3.14}; + + STATIC_CHECK(alloy::get<0>(a) == 42); + STATIC_CHECK(alloy::get<1>(a) == 3.14); + } + + { + STATIC_CHECK(alloy::TupleLike); + + STATIC_CHECK(alloy::tuple_size_v == 2); + + STATIC_CHECK(std::is_same_v, int>); + STATIC_CHECK(std::is_same_v, int>); + STATIC_CHECK(std::is_same_v, std::string const&>); + STATIC_CHECK(std::is_same_v, std::string const&>); + } +} + +TEST_CASE("adapt_std_pair") +{ + { + using Pair = std::pair; + + STATIC_CHECK(alloy::TupleLike); + + STATIC_CHECK(alloy::tuple_size_v == 2); + + STATIC_CHECK(std::is_same_v, int&>); + STATIC_CHECK(std::is_same_v, int const&>); + STATIC_CHECK(std::is_same_v, int&&>); + STATIC_CHECK(std::is_same_v, int const&&>); + + STATIC_CHECK(std::is_same_v, double&>); + STATIC_CHECK(std::is_same_v, double const&>); + STATIC_CHECK(std::is_same_v, double&&>); + STATIC_CHECK(std::is_same_v, double const&&>); + + constexpr Pair p(42, 3.14); + + STATIC_CHECK(alloy::get<0>(p) == 42); + STATIC_CHECK(alloy::get<1>(p) == 3.14); + } +} + +TEST_CASE("adapt_std_tuple") +{ + { + using Tuple = std::tuple; + + STATIC_CHECK(alloy::TupleLike); + + STATIC_CHECK(alloy::tuple_size_v == 3); + + STATIC_CHECK(std::is_same_v, int&>); + STATIC_CHECK(std::is_same_v, int const&>); + STATIC_CHECK(std::is_same_v, int&&>); + STATIC_CHECK(std::is_same_v, int const&&>); + + STATIC_CHECK(std::is_same_v, double&>); + STATIC_CHECK(std::is_same_v, double const&>); + STATIC_CHECK(std::is_same_v, double&&>); + STATIC_CHECK(std::is_same_v, double const&&>); + + STATIC_CHECK(std::is_same_v, char&>); + STATIC_CHECK(std::is_same_v, char const&>); + STATIC_CHECK(std::is_same_v, char&&>); + STATIC_CHECK(std::is_same_v, char const&&>); + + constexpr Tuple p(42, 3.14, 'A'); + + STATIC_CHECK(alloy::get<0>(p) == 42); + STATIC_CHECK(alloy::get<1>(p) == 3.14); + STATIC_CHECK(alloy::get<2>(p) == 'A'); + } +} + +TEST_CASE("tuple") +{ + { + STATIC_CHECK(std::is_trivially_default_constructible_v>); + + using Tuple = alloy::tuple; + + STATIC_CHECK(alloy::TupleLike); + + STATIC_CHECK(alloy::tuple_size_v == 3); + + STATIC_CHECK(std::is_same_v, int&>); + STATIC_CHECK(std::is_same_v, int const&>); + STATIC_CHECK(std::is_same_v, int&&>); + STATIC_CHECK(std::is_same_v, int const&&>); + + STATIC_CHECK(std::is_same_v, double&>); + STATIC_CHECK(std::is_same_v, double const&>); + STATIC_CHECK(std::is_same_v, double&&>); + STATIC_CHECK(std::is_same_v, double const&&>); + + STATIC_CHECK(std::is_same_v, char&>); + STATIC_CHECK(std::is_same_v, char const&>); + STATIC_CHECK(std::is_same_v, char&&>); + STATIC_CHECK(std::is_same_v, char const&&>); + + constexpr Tuple t(42, 3.14, 'A'); + + STATIC_CHECK(alloy::get<0>(t) == 42); + STATIC_CHECK(alloy::get<1>(t) == 3.14); + STATIC_CHECK(alloy::get<2>(t) == 'A'); + } + + { + using Tuple = alloy::tuple; + + STATIC_CHECK(alloy::TupleLike); + STATIC_CHECK(alloy::TupleLikeView); + + STATIC_CHECK(alloy::tuple_size_v == 3); + + STATIC_CHECK(std::is_same_v, int&>); + STATIC_CHECK(std::is_same_v, int&>); + STATIC_CHECK(std::is_same_v, int&>); + STATIC_CHECK(std::is_same_v, int&>); + + STATIC_CHECK(std::is_same_v, double&>); + STATIC_CHECK(std::is_same_v, double&>); + STATIC_CHECK(std::is_same_v, double&>); + STATIC_CHECK(std::is_same_v, double&>); + + STATIC_CHECK(std::is_same_v, char&>); + STATIC_CHECK(std::is_same_v, char&>); + STATIC_CHECK(std::is_same_v, char&>); + STATIC_CHECK(std::is_same_v, char&>); + + int x = 42; + double y = 3.14; + char z = 'A'; + Tuple const t(x, y, z); + + CHECK(alloy::get<0>(t) == 42); + CHECK(alloy::get<1>(t) == 3.14); + CHECK(alloy::get<2>(t) == 'A'); + } + + { + using Tuple = alloy::tuple; + + STATIC_CHECK(alloy::TupleLike); + STATIC_CHECK(alloy::TupleLikeView); + + STATIC_CHECK(alloy::tuple_size_v == 3); + + STATIC_CHECK(std::is_same_v, int const&>); + STATIC_CHECK(std::is_same_v, int const&>); + STATIC_CHECK(std::is_same_v, int const&>); + STATIC_CHECK(std::is_same_v, int const&>); + + STATIC_CHECK(std::is_same_v, double const&>); + STATIC_CHECK(std::is_same_v, double const&>); + STATIC_CHECK(std::is_same_v, double const&>); + STATIC_CHECK(std::is_same_v, double const&>); + + STATIC_CHECK(std::is_same_v, char const&>); + STATIC_CHECK(std::is_same_v, char const&>); + STATIC_CHECK(std::is_same_v, char const&>); + STATIC_CHECK(std::is_same_v, char const&>); + + int const x = 42; + double const y = 3.14; + char const z = 'A'; + Tuple const t(x, y, z); + + CHECK(alloy::get<0>(t) == 42); + CHECK(alloy::get<1>(t) == 3.14); + CHECK(alloy::get<2>(t) == 'A'); + } + + { + STATIC_CHECK(std::is_constructible_v, alloy::tuple&>); + STATIC_CHECK(std::is_constructible_v, alloy::tuple const&>); + STATIC_CHECK(std::is_constructible_v, alloy::tuple&&>); + STATIC_CHECK(std::is_constructible_v, alloy::tuple const&&>); + + STATIC_CHECK(std::is_nothrow_constructible_v, alloy::tuple&>); + STATIC_CHECK(std::is_nothrow_constructible_v, alloy::tuple const&>); + STATIC_CHECK(std::is_nothrow_constructible_v, alloy::tuple&&>); + STATIC_CHECK(std::is_nothrow_constructible_v, alloy::tuple const&&>); + + STATIC_CHECK(std::is_convertible_v&, alloy::tuple>); + STATIC_CHECK(std::is_convertible_v const&, alloy::tuple>); + STATIC_CHECK(std::is_convertible_v&&, alloy::tuple>); + STATIC_CHECK(std::is_convertible_v const&&, alloy::tuple>); + + STATIC_CHECK(std::is_nothrow_convertible_v&, alloy::tuple>); + STATIC_CHECK(std::is_nothrow_convertible_v const&, alloy::tuple>); + STATIC_CHECK(std::is_nothrow_convertible_v&&, alloy::tuple>); + STATIC_CHECK(std::is_nothrow_convertible_v const&&, alloy::tuple>); + + struct NeedExplicitConversion + { + explicit NeedExplicitConversion(int) {} + }; + + STATIC_CHECK(std::is_constructible_v, alloy::tuple&>); + STATIC_CHECK(std::is_constructible_v, alloy::tuple const&>); + STATIC_CHECK(std::is_constructible_v, alloy::tuple&&>); + STATIC_CHECK(std::is_constructible_v, alloy::tuple const&&>); + + STATIC_CHECK(!std::is_convertible_v&, alloy::tuple>); + STATIC_CHECK(!std::is_convertible_v const&, alloy::tuple>); + STATIC_CHECK(!std::is_convertible_v&&, alloy::tuple>); + STATIC_CHECK(!std::is_convertible_v const&&, alloy::tuple>); + + struct PotentiallyThrowing + { + PotentiallyThrowing(int) noexcept(false) {} + }; + + STATIC_CHECK(std::is_constructible_v, alloy::tuple&>); + STATIC_CHECK(std::is_constructible_v, alloy::tuple const&>); + STATIC_CHECK(std::is_constructible_v, alloy::tuple&&>); + STATIC_CHECK(std::is_constructible_v, alloy::tuple const&&>); + + STATIC_CHECK(!std::is_nothrow_constructible_v, alloy::tuple&>); + STATIC_CHECK(!std::is_nothrow_constructible_v, alloy::tuple const&>); + STATIC_CHECK(!std::is_nothrow_constructible_v, alloy::tuple&&>); + STATIC_CHECK(!std::is_nothrow_constructible_v, alloy::tuple const&&>); + + alloy::tuple a(42, 3.14f); + alloy::tuple b(a); + CHECK(alloy::get<0>(b) == float{42}); + CHECK(alloy::get<1>(b) == 3); + } + + { + STATIC_CHECK(std::is_constructible_v, AdaptedStruct>); + + constexpr AdaptedStruct a{42, 3.14}; + constexpr alloy::tuple t(a); + STATIC_CHECK(alloy::get<0>(t) == 42); + STATIC_CHECK(alloy::get<1>(t) == 3.14); + } + + { + STATIC_CHECK(std::is_nothrow_copy_assignable_v>); + STATIC_CHECK(std::is_nothrow_move_assignable_v>); + + alloy::tuple a(33), b(4); + a = b; + a = std::move(b); + CHECK(alloy::get<0>(a) == 4); + } + + { + STATIC_CHECK(std::is_nothrow_copy_assignable_v>); + STATIC_CHECK(std::is_nothrow_move_assignable_v>); + + int x = 33, y = 4; + alloy::tuple a(x); + alloy::tuple b(y); + a = b; + a = std::move(b); + CHECK(alloy::get<0>(a) == 4); + } + + { + STATIC_CHECK(std::is_assignable_v&, alloy::tuple const&>); + STATIC_CHECK(std::is_assignable_v&, alloy::tuple&&>); + STATIC_CHECK(std::is_nothrow_assignable_v&, alloy::tuple const&>); + STATIC_CHECK(std::is_nothrow_assignable_v&, alloy::tuple&&>); + + alloy::tuple a(33); + alloy::tuple b(4.f); + a = b; + a = std::move(b); + CHECK(alloy::get<0>(a) == 4); + } + + { + STATIC_CHECK(std::is_assignable_v&, AdaptedStruct const&>); + STATIC_CHECK(std::is_assignable_v&, AdaptedStruct&&>); + + alloy::tuple a(33, 3.14); + AdaptedStruct b{4, 2.18}; + a = b; + a = std::move(b); + CHECK(alloy::get<0>(a) == 4); + CHECK(alloy::get<1>(a) == 2.18); + } + + { + alloy::tuple a(33), b(4); + a.swap(b); + swap(a, b); + CHECK(alloy::get<0>(a) == 33); + CHECK(alloy::get<0>(b) == 4); + } + + { + alloy::tuple a(42, 3.14), b = a; + CHECK(a == b); + } + + { + struct Empty + {}; + struct OnlyChar + { + char c; + }; + [[maybe_unused]] constexpr alloy::tuple a = {{}, {'A'}}; + [[maybe_unused]] constexpr alloy::tuple b = {{'A'}, {}}; + STATIC_CHECK(sizeof(a) == sizeof(OnlyChar)); + STATIC_CHECK(sizeof(b) == sizeof(OnlyChar)); + } + + STATIC_CHECK(std::is_same_v, alloy::tuple&>, alloy::tuple>); + STATIC_CHECK(std::is_same_v&>, alloy::tuple>); + +#if __cpp_lib_reference_from_temporary >= 202202L + STATIC_CHECK(!std::is_constructible_v, double>); + STATIC_CHECK(!std::is_constructible_v, double&>); + STATIC_CHECK(!std::is_constructible_v, double&&>); + + STATIC_CHECK(!std::is_constructible_v, alloy::tuple&>); + STATIC_CHECK(!std::is_constructible_v, alloy::tuple&>); + + STATIC_CHECK(!std::is_constructible_v, alloy::tuple const&>); + STATIC_CHECK(!std::is_constructible_v, alloy::tuple const&>); + + STATIC_CHECK(!std::is_constructible_v, alloy::tuple&&>); + STATIC_CHECK(!std::is_constructible_v, alloy::tuple&&>); + + STATIC_CHECK(!std::is_constructible_v, alloy::tuple const&&>); + STATIC_CHECK(!std::is_constructible_v, alloy::tuple const&&>); + + STATIC_CHECK(!std::is_constructible_v, AdaptedStruct>); +#endif +} + +TEST_CASE("utility") +{ + { + constexpr alloy::tuple a(42); + constexpr alloy::tuple b(3.14); + constexpr auto c = alloy::tuple_cat(a, b); + STATIC_CHECK(alloy::get<0>(c) == 42); + STATIC_CHECK(alloy::get<1>(c) == 3.14); + } + + { + constexpr alloy::tuple a(12); + constexpr AdaptedStruct b{34, 3.14}; + constexpr auto c = alloy::tuple_cat(a, b); + STATIC_CHECK(alloy::get<0>(c) == 12); + STATIC_CHECK(alloy::get<1>(c) == 34); + STATIC_CHECK(alloy::get<2>(c) == 3.14); + } + + { + constexpr AdaptedStruct a{12, 3.14}; + constexpr alloy::tuple b(34); + constexpr auto c = alloy::tuple_cat(a, b); + STATIC_CHECK(alloy::get<0>(c) == 12); + STATIC_CHECK(alloy::get<1>(c) == 3.14); + STATIC_CHECK(alloy::get<2>(c) == 34); + } + + { + constexpr AdaptedStruct a{12, 3.14}; + constexpr AdaptedStruct b{34, 2.18}; + constexpr auto c = alloy::tuple_cat(a, b); + STATIC_CHECK(alloy::get<0>(c) == 12); + STATIC_CHECK(alloy::get<1>(c) == 3.14); + STATIC_CHECK(alloy::get<2>(c) == 34); + STATIC_CHECK(alloy::get<3>(c) == 2.18); + } + + { + OldStyle const a{12, "foo"}; + OldStyle const b{34, "bar"}; + auto const c = alloy::tuple_cat(a, b); + CHECK(alloy::get<0>(c) == 12); + CHECK(alloy::get<1>(c) == "foo"); + CHECK(alloy::get<2>(c) == 34); + CHECK(alloy::get<3>(c) == "bar"); + } + + { + constexpr alloy::tuple a(42, 3.14f, 2.18); + constexpr auto b = alloy::tuple_split<1, 2>(a); + STATIC_CHECK(alloy::get<0>(alloy::get<0>(b)) == 42); + STATIC_CHECK(alloy::get<0>(alloy::get<1>(b)) == 3.14f); + STATIC_CHECK(alloy::get<1>(alloy::get<1>(b)) == 2.18); + } + + { + alloy::tuple const from(33, 3.14); + alloy::tuple to(4, 2.18); + alloy::tuple_assign(from, to); + CHECK(alloy::get<0>(to) == 33); + CHECK(alloy::get<1>(to) == 3.14); + } + + { + alloy::tuple from(33, 3.14); + alloy::tuple to(4, 2.18); + alloy::tuple_assign(std::move(from), to); + CHECK(alloy::get<0>(to) == 33); + CHECK(alloy::get<1>(to) == 3.14); + } + + { + alloy::tuple tuple(42, 3.14); + auto view = alloy::tuple_ref(tuple); + CHECK(alloy::get<0>(view) == 42); + CHECK(alloy::get<1>(view) == 3.14); + } + + { + alloy::tuple tuple(42, 3.14); + alloy::for_each(tuple, [](auto& elem) { elem = 33 - 4; }); + CHECK(alloy::get<0>(tuple) == 29); + CHECK(alloy::get<1>(tuple) == 29.); + } +} + +TEST_CASE("io") +{ + { + { + std::stringstream ss; + ss << alloy::tuple<>(); + CHECK(ss.str() == "()"); + } + { + std::stringstream ss; + ss << alloy::tuple(42); + CHECK(ss.str() == "(42)"); + } + { + std::stringstream ss; + ss << alloy::tuple(42, 3.14); + CHECK(ss.str() == "(42, 3.14)"); + } + } +} From 7869dfedf8c16f6f3e34f3cf73db75577de627e1 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 01:05:39 +0900 Subject: [PATCH 02/41] Test components separately --- .github/workflows/ci.yml | 2 ++ test/CMakeLists.txt | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9112404bf..e3121cb1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -275,6 +275,8 @@ jobs: -DCMAKE_CXX_FLAGS="${{ matrix.compiler.cxxflags }}" \ -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version.number }} \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type.name }} \ + -DIRIS_TEST_ALLOY=${{ case(matrix.components.general == 'true' || matrix.components.alloy == 'true', 'ON', 'OFF') }} + -DIRIS_TEST_X4=${{ case(matrix.components.general == 'true' || matrix.components.x4 == 'true', 'ON', 'OFF') }} -S . - name: Build Tests diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c8bfafd2a..5fe7e9d68 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,6 +5,10 @@ # https://www.boost.org/LICENSE_1_0.txt if(PROJECT_IS_TOP_LEVEL) - add_subdirectory(alloy) - add_subdirectory(x4) + if(IRIS_TEST_ALLOY) + add_subdirectory(alloy) + endif() + if(IRIS_TEST_X4) + add_subdirectory(x4) + endif() endif() From 54aab007cf2fbb9199de9ff8f8b7674bd96e0061 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 01:19:54 +0900 Subject: [PATCH 03/41] Fix CI workflow to correctly process component changes --- .github/workflows/ci.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3121cb1b..f8f788e4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: changes: runs-on: ubuntu-latest outputs: - components: ${{ steps.filter.outputs.changes }} + components: ${{ steps.processed.outputs.changes }} steps: - uses: actions/checkout@v5 - uses: dorny/paths-filter@v3 @@ -42,6 +42,18 @@ jobs: - 'include/iris/x4.hpp' - 'include/iris/x4/**/*' - 'test/x4/**/*' + - uses: actions/github-script@v8 + id: processed + env: + CHANGES: ${{ steps.filter.outputs.changes }} + with: + script: | + const changes = JSON.parse(process.env.CHANGES); + let result = []; + if (changes.includes('general') || changes.includes('alloy')) result.append('alloy'); + if (changes.includes('general') || changes.includes('x4')) result.append('x4'); + return result; + build: name: "[${{ matrix.cpp_version.name }}] ${{ matrix.components }} | ${{ matrix.compiler.toolset }}-${{ matrix.compiler.version }} (${{ matrix.build_type.name }}) @ ${{ matrix.os.name }}-${{ matrix.os.version }}" @@ -275,8 +287,8 @@ jobs: -DCMAKE_CXX_FLAGS="${{ matrix.compiler.cxxflags }}" \ -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version.number }} \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type.name }} \ - -DIRIS_TEST_ALLOY=${{ case(matrix.components.general == 'true' || matrix.components.alloy == 'true', 'ON', 'OFF') }} - -DIRIS_TEST_X4=${{ case(matrix.components.general == 'true' || matrix.components.x4 == 'true', 'ON', 'OFF') }} + -DIRIS_TEST_ALLOY=${{ case(matrix.components.general == 'true' || matrix.components.alloy == 'true', 'ON', 'OFF') }} \ + -DIRIS_TEST_X4=${{ case(matrix.components.general == 'true' || matrix.components.x4 == 'true', 'ON', 'OFF') }} \ -S . - name: Build Tests From a5befb3da19bfa3104d33a72f64c33fb9e740fd8 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 01:21:21 +0900 Subject: [PATCH 04/41] Use `push` --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8f788e4a..f90c87874 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,8 +50,8 @@ jobs: script: | const changes = JSON.parse(process.env.CHANGES); let result = []; - if (changes.includes('general') || changes.includes('alloy')) result.append('alloy'); - if (changes.includes('general') || changes.includes('x4')) result.append('x4'); + if (changes.includes('general') || changes.includes('alloy')) result.push('alloy'); + if (changes.includes('general') || changes.includes('x4')) result.push('x4'); return result; From 7cc50b57a453fb45c73a72d24e48d89577d97d10 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 01:25:11 +0900 Subject: [PATCH 05/41] Fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f90c87874..eac1f1451 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: changes: runs-on: ubuntu-latest outputs: - components: ${{ steps.processed.outputs.changes }} + components: ${{ steps.processed.outputs.result }} steps: - uses: actions/checkout@v5 - uses: dorny/paths-filter@v3 From 751ad252a4bbeee7794a2cf712c1fbc878b9090a Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 13:05:24 +0900 Subject: [PATCH 06/41] Fix --- include/iris/alloy/traits.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/iris/alloy/traits.hpp b/include/iris/alloy/traits.hpp index 146814811..2a09f98e6 100644 --- a/include/iris/alloy/traits.hpp +++ b/include/iris/alloy/traits.hpp @@ -166,7 +166,7 @@ template concept TupleLikeView = TupleLike && detail::is_view>::value; template -inline constexpr bool is_tuple_like_view_v = is_tuple_like::value; +inline constexpr bool is_tuple_like_view_v = is_tuple_like_view::value; namespace detail { From 99e360dff49e1d531831c11b96cb9b8fd588f1f7 Mon Sep 17 00:00:00 2001 From: KakeyamaY Date: Mon, 9 Feb 2026 13:28:19 +0900 Subject: [PATCH 07/41] Debug --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eac1f1451..fb4ed2f25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,9 +49,11 @@ jobs: with: script: | const changes = JSON.parse(process.env.CHANGES); + console.log('changes: ', changes); let result = []; if (changes.includes('general') || changes.includes('alloy')) result.push('alloy'); if (changes.includes('general') || changes.includes('x4')) result.push('x4'); + console.log('result: ', result); return result; From a01f1fa0aaf6ca22b29d74ac1c323c78374db321 Mon Sep 17 00:00:00 2001 From: KakeyamaY Date: Mon, 9 Feb 2026 13:32:05 +0900 Subject: [PATCH 08/41] Refactor CI configuration for component flags --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb4ed2f25..f0915ae95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -289,8 +289,8 @@ jobs: -DCMAKE_CXX_FLAGS="${{ matrix.compiler.cxxflags }}" \ -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version.number }} \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type.name }} \ - -DIRIS_TEST_ALLOY=${{ case(matrix.components.general == 'true' || matrix.components.alloy == 'true', 'ON', 'OFF') }} \ - -DIRIS_TEST_X4=${{ case(matrix.components.general == 'true' || matrix.components.x4 == 'true', 'ON', 'OFF') }} \ + -DIRIS_TEST_ALLOY=${{ case(matrix.components == 'alloy', 'ON', 'OFF') }} \ + -DIRIS_TEST_X4=${{ case(matrix.components == 'x4', 'ON', 'OFF') }} \ -S . - name: Build Tests From 9b908e90ba38e169eda67b2b950119cd27d8f6c7 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 15:30:01 +0900 Subject: [PATCH 09/41] Do replace `boost::fusion` with `alloy::tuple` --- .github/workflows/ci.yml | 18 +--- CMakeLists.txt | 24 ----- README.md | 8 +- include/iris/alloy/traits.hpp | 13 ++- include/iris/x4/core/attribute.hpp | 3 - .../iris/x4/core/detail/parse_alternative.hpp | 8 +- .../x4/core/detail/parse_into_container.hpp | 18 ++-- .../iris/x4/core/detail/parse_sequence.hpp | 36 +++---- include/iris/x4/core/move_to.hpp | 43 +++----- include/iris/x4/debug/print_attribute.hpp | 10 +- include/iris/x4/operator/sequence.hpp | 4 +- include/iris/x4/traits/attribute_category.hpp | 5 +- include/iris/x4/traits/container_traits.hpp | 10 +- include/iris/x4/traits/substitution.hpp | 6 +- include/iris/x4/traits/tuple_traits.hpp | 21 ++-- test/x4/alternative.cpp | 46 ++++---- test/x4/attr.cpp | 2 +- test/x4/attribute.cpp | 2 +- test/x4/attribute_type_check.cpp | 14 ++- test/x4/container_support.cpp | 2 +- test/x4/debug.cpp | 6 +- test/x4/expect.cpp | 30 +++--- test/x4/int.cpp | 9 +- test/x4/lit.cpp | 9 +- test/x4/omit.cpp | 24 ++--- test/x4/optional.cpp | 26 +++-- test/x4/plus.cpp | 9 +- test/x4/raw.cpp | 2 +- test/x4/rule3.cpp | 9 +- test/x4/rule4.cpp | 13 +-- test/x4/sequence.cpp | 102 ++++++++---------- test/x4/symbols3.cpp | 12 +-- 32 files changed, 224 insertions(+), 320 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0915ae95..f0ec02103 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: console.log('changes: ', changes); let result = []; if (changes.includes('general') || changes.includes('alloy')) result.push('alloy'); - if (changes.includes('general') || changes.includes('x4')) result.push('x4'); + if (changes.includes('general') || changes.includes('alloy') || changes.includes('x4')) result.push('x4'); console.log('result: ', result); return result; @@ -202,27 +202,11 @@ jobs: tools/build \ tools/boost_install \ libs/assert \ - libs/bind \ libs/config \ - libs/container_hash \ libs/core \ - libs/describe \ - libs/detail \ - libs/function \ - libs/function_types \ - libs/functional \ - libs/fusion \ - libs/io \ - libs/mp11 \ - libs/mpl \ - libs/predef \ libs/preprocessor \ libs/static_assert \ libs/throw_exception \ - libs/tuple \ - libs/type_traits \ - libs/typeof \ - libs/utility - name: Build upstream Boost libraries (Ubuntu) if: matrix.os.name == 'ubuntu' && steps.cache-boost.outputs.cache-hit != 'true' diff --git a/CMakeLists.txt b/CMakeLists.txt index a813b6633..0f0341ee9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,30 +60,6 @@ set_target_properties(iris_x4 PROPERTIES CXX_EXTENSIONS OFF) set(iris_x4_boost_deps "") -# Everything required by `fusion` (manually confirmed) -list(APPEND iris_x4_boost_deps fusion) -list(APPEND iris_x4_boost_deps config) -list(APPEND iris_x4_boost_deps container_hash) -list(APPEND iris_x4_boost_deps describe) -list(APPEND iris_x4_boost_deps mp11) -list(APPEND iris_x4_boost_deps core) -list(APPEND iris_x4_boost_deps assert) -list(APPEND iris_x4_boost_deps static_assert) -list(APPEND iris_x4_boost_deps throw_exception) -list(APPEND iris_x4_boost_deps function_types) -list(APPEND iris_x4_boost_deps detail) -list(APPEND iris_x4_boost_deps mpl) -list(APPEND iris_x4_boost_deps preprocessor) -list(APPEND iris_x4_boost_deps type_traits) -list(APPEND iris_x4_boost_deps predef) -list(APPEND iris_x4_boost_deps utility) -list(APPEND iris_x4_boost_deps io) -list(APPEND iris_x4_boost_deps tuple) -list(APPEND iris_x4_boost_deps typeof) -list(APPEND iris_x4_boost_deps functional) -list(APPEND iris_x4_boost_deps function) -list(APPEND iris_x4_boost_deps bind) - # Everything required by `preprocessor` (manually confirmed) list(APPEND iris_x4_boost_deps preprocessor) diff --git a/README.md b/README.md index f6baf801b..44a2ba390 100644 --- a/README.md +++ b/README.md @@ -45,12 +45,8 @@ Note: Boost dependency is going to be removed entirely in the near future. ```console git submodule update --init --depth 1 --recursive -- \ - tools/build tools/boost_install libs/assert libs/bind libs/config \ - libs/container_hash libs/core libs/describe libs/detail \ - libs/function libs/function_types libs/functional libs/fusion \ - libs/io libs/mp11 libs/mpl libs/predef libs/preprocessor \ - libs/static_assert libs/throw_exception libs/tuple \ - libs/type_traits libs/typeof libs/utility + tools/build tools/boost_install libs/assert libs/config \ + libs/core libs/preprocessor libs/static_assert libs/throw_exception # Linux ./bootstrap.sh diff --git a/include/iris/alloy/traits.hpp b/include/iris/alloy/traits.hpp index 2a09f98e6..1e9b69095 100644 --- a/include/iris/alloy/traits.hpp +++ b/include/iris/alloy/traits.hpp @@ -149,13 +149,18 @@ struct tuple_element namespace detail { -template>> - requires is_tuple_like_v -struct is_view; +template +struct is_view_impl {}; template +struct is_view_impl> : std::conjunction>...> {}; + +template +struct is_view : std::false_type {}; + +template requires is_tuple_like_v -struct is_view> : std::conjunction>...> {}; +struct is_view : is_view_impl>> {}; } // detail diff --git a/include/iris/x4/core/attribute.hpp b/include/iris/x4/core/attribute.hpp index 5cf5e12d0..6276a05ba 100644 --- a/include/iris/x4/core/attribute.hpp +++ b/include/iris/x4/core/attribute.hpp @@ -37,9 +37,6 @@ concept X4NonUnusedAttribute = std::is_object_v && // implies not reference !std::is_base_of_v> && std::move_constructible>; - // TODO: `fusion::iterator_range` does not satisfy these due to `fusion::vector`'s iterator being a reference type - //std::default_initializable> && - //std::assignable_from&, std::remove_const_t>; template concept X4Attribute = X4UnusedAttribute || X4NonUnusedAttribute; diff --git a/include/iris/x4/core/detail/parse_alternative.hpp b/include/iris/x4/core/detail/parse_alternative.hpp index 07d3e6924..352330273 100644 --- a/include/iris/x4/core/detail/parse_alternative.hpp +++ b/include/iris/x4/core/detail/parse_alternative.hpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include @@ -112,7 +112,7 @@ template struct pass_non_variant_attribute { using attr_type = typename std::remove_reference_t< - typename boost::fusion::result_of::front::type + alloy::tuple_element_t<0, Attr> >; using pass = pass_parser_attribute; using type = typename pass::type; @@ -120,9 +120,9 @@ struct pass_non_variant_attribute template [[nodiscard]] static constexpr type call(Attr_& attr) - noexcept(noexcept(pass::call(boost::fusion::front(attr)))) + noexcept(noexcept(pass::call(alloy::get<0>(attr)))) { - return pass::call(boost::fusion::front(attr)); + return pass::call(alloy::get<0>(attr)); } }; diff --git a/include/iris/x4/core/detail/parse_into_container.hpp b/include/iris/x4/core/detail/parse_into_container.hpp index 58ba564e8..ac90a9a5a 100644 --- a/include/iris/x4/core/detail/parse_into_container.hpp +++ b/include/iris/x4/core/detail/parse_into_container.hpp @@ -18,9 +18,7 @@ #include #include -#include -#include -#include +#include #include #include @@ -89,11 +87,11 @@ struct parse_into_container_base_impl // ------------------------------------------------------ - // Parser has attribute && it is NOT fusion sequence + // Parser has attribute && it is NOT tuple-like template Se, class Context, X4Attribute Attr> requires has_attribute_v && - (!boost::fusion::traits::is_sequence::value) + (!alloy::is_tuple_like_v) [[nodiscard]] static constexpr bool call( Parser const& parser, It& first, Se const& last, @@ -104,20 +102,20 @@ struct parse_into_container_base_impl return parse_into_container_base_impl::call_synthesize(parser, first, last, ctx, attr); } - // Parser has attribute && it is fusion sequence + // Parser has attribute && it is tuple-like template Se, class Context, X4Attribute Attr> requires has_attribute_v && - boost::fusion::traits::is_sequence::value + alloy::is_tuple_like_v [[nodiscard]] static constexpr bool call( Parser const& parser, It& first, Se const& last, Context const& ctx, Attr& attr - ) noexcept(noexcept(parse_into_container_base_impl::call_synthesize(parser, first, last, ctx, boost::fusion::front(attr)))) + ) noexcept(noexcept(parse_into_container_base_impl::call_synthesize(parser, first, last, ctx, alloy::get<0>(attr)))) { - static_assert(traits::has_size_v, "Expecting a single element fusion sequence"); + static_assert(traits::has_size_v, "Expecting a single element tuple-like"); // TODO: reduce call stack while keeping maintainability - return parse_into_container_base_impl::call_synthesize(parser, first, last, ctx, boost::fusion::front(attr)); + return parse_into_container_base_impl::call_synthesize(parser, first, last, ctx, alloy::get<0>(attr)); } // Parser has no attribute (pass unused) diff --git a/include/iris/x4/core/detail/parse_sequence.hpp b/include/iris/x4/core/detail/parse_sequence.hpp index b2aba10f2..eee6e0dcf 100644 --- a/include/iris/x4/core/detail/parse_sequence.hpp +++ b/include/iris/x4/core/detail/parse_sequence.hpp @@ -20,11 +20,8 @@ #include #include -#include -#include -#include -#include -#include +#include +#include #include #include @@ -55,15 +52,13 @@ struct pass_sequence_attribute_unused template struct pass_sequence_attribute_size_one_view { - using type = typename boost::fusion::result_of::deref< - typename boost::fusion::result_of::begin::type - >::type; + using type = alloy::tuple_element_t<0, Attr>; [[nodiscard]] static constexpr type call(Attr& attribute) - noexcept(noexcept(boost::fusion::deref(boost::fusion::begin(attribute)))) + noexcept(noexcept(alloy::get<0>(attribute))) { - return boost::fusion::deref(boost::fusion::begin(attribute)); + return alloy::get<0>(attribute); } }; @@ -114,11 +109,11 @@ struct partition_attribute static constexpr std::size_t l_size = parser_traits::sequence_size; static constexpr std::size_t r_size = parser_traits::sequence_size; - static constexpr std::size_t actual_size = static_cast(boost::fusion::result_of::size::value); + static constexpr std::size_t actual_size = alloy::tuple_size_v; static constexpr std::size_t expected_size = l_size + r_size; // If you got an error here, then you are trying to pass - // a fusion sequence with the wrong number of elements + // a tuple-like with the wrong number of elements // as that expected by the (sequence) parser. static_assert( actual_size >= expected_size, @@ -129,28 +124,23 @@ struct partition_attribute "Sequence size of the passed attribute is greater than expected." ); - using l_begin = boost::fusion::result_of::begin::type; - using l_end = boost::fusion::result_of::advance_c::type; - using r_end = boost::fusion::result_of::end::type; - using l_part = boost::fusion::iterator_range; - using r_part = boost::fusion::iterator_range; + using view = alloy::tuple_ref_t; + using splitted = alloy::tuple_split_t; + using l_part = alloy::tuple_element_t<0, splitted>; + using r_part = alloy::tuple_element_t<1, splitted>; using l_pass = pass_sequence_attribute; using r_pass = pass_sequence_attribute; [[nodiscard]] static constexpr l_part left(Attr& s) // TODO: noexcept { - auto i = boost::fusion::begin(s); - return l_part(i, boost::fusion::advance_c(i)); + return alloy::get<0>(alloy::tuple_split(alloy::tuple_ref(s))); } [[nodiscard]] static constexpr r_part right(Attr& s) // TODO: noexcept { - return r_part( - boost::fusion::advance_c(boost::fusion::begin(s)), - boost::fusion::end(s) - ); + return alloy::get<1>(alloy::tuple_split(alloy::tuple_ref(s))); } }; diff --git a/include/iris/x4/core/move_to.hpp b/include/iris/x4/core/move_to.hpp index d355a7de5..61c81534c 100644 --- a/include/iris/x4/core/move_to.hpp +++ b/include/iris/x4/core/move_to.hpp @@ -18,9 +18,8 @@ #include #include -#include -#include -#include +#include +#include #include #include @@ -120,11 +119,11 @@ template constexpr void move_to(Source&& src, Dest& dest) - noexcept(noexcept(dest = std::forward_like(boost::fusion::front(std::forward(src))))) + noexcept(noexcept(dest = std::forward_like(alloy::get<0>(std::forward(src))))) { static_assert(!std::same_as, Dest>, "[BUG] This call should instead resolve to the overload handling identical types"); // TODO: preliminarily invoke static_assert to check if the assignment is valid - dest = std::forward_like(boost::fusion::front(std::forward(src))); + dest = std::forward_like(alloy::get<0>(std::forward(src))); } template Dest> @@ -144,21 +143,13 @@ template) constexpr void move_to(Source&& src, Dest& dest) - noexcept( - std::is_rvalue_reference_v ? - noexcept(boost::fusion::move(std::move(src), dest)) : - noexcept(boost::fusion::copy(src, dest)) - ) + noexcept(noexcept(alloy::tuple_assign(std::forward(src), dest))) { static_assert(!std::same_as, Dest>, "[BUG] This call should instead resolve to the overload handling identical types"); // TODO: preliminarily invoke static_assert to check if the assignment is valid - if constexpr (std::is_rvalue_reference_v) { - boost::fusion::move(std::move(src), dest); - } else { - boost::fusion::copy(src, dest); - } + alloy::tuple_assign(std::forward(src), dest); } template Dest> @@ -169,7 +160,7 @@ move_to(Source&& src, Dest& dest) { static_assert(!std::same_as, Dest>, "[BUG] This call should instead resolve to the overload handling identical types"); - // dest is a variant, src is a single element fusion sequence that the variant + // dest is a variant, src is a single element tuple-like that the variant // *can* directly hold. static_assert(std::is_assignable_v); dest = std::forward(src); @@ -179,21 +170,21 @@ template && (!traits::variant_has_substitute_v) constexpr void move_to(Source&& src, Dest& dest) - noexcept(noexcept(dest = std::forward_like(boost::fusion::front(std::forward(src))))) + noexcept(noexcept(dest = std::forward_like(alloy::get<0>(std::forward(src))))) { static_assert(!std::same_as, Dest>, "[BUG] This call should instead resolve to the overload handling identical types"); - // dest is a variant, src is a single element fusion sequence that the variant - // cannot directly hold. We'll try to unwrap the single element fusion sequence. + // dest is a variant, src is a single element tuple-like that the variant + // cannot directly hold. We'll try to unwrap the single element tuple-like. // Make sure that the Dest variant can really hold Source static_assert( - traits::variant_has_substitute_v::type>, + traits::variant_has_substitute_v>, "Error! The destination variant (Dest) cannot hold the source type (Source)" ); // TODO: preliminarily invoke static_assert to check if the assignment is valid - dest = std::forward_like(boost::fusion::front(std::forward(src))); + dest = std::forward_like(alloy::get<0>(std::forward(src))); } template Dest> @@ -256,9 +247,9 @@ template Se, traits::Categorized requires traits::is_size_one_sequence_v constexpr void move_to(It first, Se last, Dest& dest) - noexcept(noexcept(x4::move_to(first, last, boost::fusion::front(dest)))) + noexcept(noexcept(x4::move_to(first, last, alloy::get<0>(dest)))) { - x4::move_to(first, last, boost::fusion::front(dest)); + x4::move_to(first, last, alloy::get<0>(dest)); } // Move non-container `src` into container `dest`. @@ -294,16 +285,16 @@ move_to(Source&& src, Dest& dest) } } -// Size-one fusion tuple forwarding +// Size-one tuple-like forwarding template Dest> requires traits::is_size_one_sequence_v constexpr void move_to(Source&& src, Dest& dest) - noexcept(noexcept(x4::move_to(std::forward(src), boost::fusion::front(dest)))) + noexcept(noexcept(x4::move_to(std::forward(src), alloy::get<0>(dest)))) { static_assert(!std::same_as, Dest>, "[BUG] This call should instead resolve to the overload handling identical types"); - x4::move_to(std::forward(src), boost::fusion::front(dest)); + x4::move_to(std::forward(src), alloy::get<0>(dest)); } template diff --git a/include/iris/x4/debug/print_attribute.hpp b/include/iris/x4/debug/print_attribute.hpp index b81774fcc..378569695 100644 --- a/include/iris/x4/debug/print_attribute.hpp +++ b/include/iris/x4/debug/print_attribute.hpp @@ -16,7 +16,7 @@ #include -#include +#include #ifdef IRIS_X4_UNICODE # include @@ -30,9 +30,9 @@ void print_attribute(Out& out, T const& val); namespace detail { template -struct print_fusion_sequence +struct print_tuple_like { - print_fusion_sequence(Out& out) + print_tuple_like(Out& out) : out(out) , is_first(true) {} @@ -114,11 +114,11 @@ struct print_attribute_debug } #endif - // for fusion data types + // for tuple-likes static void call(Out& out, CategorizedAttr auto const& val) { out << '['; - boost::fusion::for_each(val, detail::print_fusion_sequence(out)); + alloy::for_each(val, detail::print_tuple_like(out)); out << ']'; } diff --git a/include/iris/x4/operator/sequence.hpp b/include/iris/x4/operator/sequence.hpp index 949b66141..b2d95c11d 100644 --- a/include/iris/x4/operator/sequence.hpp +++ b/include/iris/x4/operator/sequence.hpp @@ -19,7 +19,7 @@ #include -#include // TODO: remove this +#include #include #include @@ -31,7 +31,7 @@ namespace iris::x4 { template struct sequence : binary_parser> { - using attribute_type = traits::attribute_of_binary::type; + using attribute_type = traits::attribute_of_binary::type; static constexpr std::size_t sequence_size = parser_traits::sequence_size + parser_traits::sequence_size; diff --git a/include/iris/x4/traits/attribute_category.hpp b/include/iris/x4/traits/attribute_category.hpp index f347abdc1..5032b1ff8 100644 --- a/include/iris/x4/traits/attribute_category.hpp +++ b/include/iris/x4/traits/attribute_category.hpp @@ -15,8 +15,7 @@ #include #include -#include -#include +#include #include @@ -89,7 +88,7 @@ concept NonUnusedAttr = !std::is_same_v>::type, unused_attr>; template - requires boost::fusion::traits::is_sequence>::value + requires alloy::is_tuple_like_v struct attribute_category { using type = tuple_attr; diff --git a/include/iris/x4/traits/container_traits.hpp b/include/iris/x4/traits/container_traits.hpp index a46272f63..c5c9b28fc 100644 --- a/include/iris/x4/traits/container_traits.hpp +++ b/include/iris/x4/traits/container_traits.hpp @@ -14,9 +14,8 @@ #include #include -#include -#include -#include +#include +#include #include #include @@ -431,9 +430,6 @@ struct is_container> template requires - // required; fusion pollutes ADL on `size`, which is called by `std::ranges::empty` on Clang 22 - (!boost::fusion::traits::is_sequence>::value) && - std::default_initializable && requires(T& c) { @@ -476,7 +472,7 @@ template using build_container_t = typename build_container::type; template -struct build_container> : build_container {}; +struct build_container> : build_container {}; template<> struct build_container diff --git a/include/iris/x4/traits/substitution.hpp b/include/iris/x4/traits/substitution.hpp index 387343517..49d2b2fa0 100644 --- a/include/iris/x4/traits/substitution.hpp +++ b/include/iris/x4/traits/substitution.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include @@ -52,8 +52,8 @@ struct is_substitute_impl : std::false_type {}; template requires std::conjunction_v< - boost::fusion::traits::is_sequence, - boost::fusion::traits::is_sequence + alloy::is_tuple_like, + alloy::is_tuple_like > struct is_substitute_impl : boost::mpl::equal> diff --git a/include/iris/x4/traits/tuple_traits.hpp b/include/iris/x4/traits/tuple_traits.hpp index bd277ff09..5f7810621 100644 --- a/include/iris/x4/traits/tuple_traits.hpp +++ b/include/iris/x4/traits/tuple_traits.hpp @@ -10,10 +10,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ================================================_==============================*/ -#include -#include -#include -#include +#include #include @@ -22,8 +19,8 @@ namespace iris::x4::traits { template struct has_same_size : std::bool_constant< - boost::fusion::result_of::size>::value == - boost::fusion::result_of::size>::value + alloy::tuple_size_v> == + alloy::tuple_size_v> > {}; @@ -32,7 +29,7 @@ constexpr bool has_same_size_v = has_same_size::value; template struct has_size - : std::bool_constant>::value == N> + : std::bool_constant> == N> {}; template @@ -41,8 +38,8 @@ constexpr bool has_size_v = has_size::value; template struct is_same_size_sequence : std::bool_constant>, - boost::fusion::traits::is_sequence>, + alloy::is_tuple_like>, + alloy::is_tuple_like>, has_same_size >> {}; @@ -53,7 +50,7 @@ constexpr bool is_same_size_sequence_v = is_same_size_sequence::value; template struct is_size_one_sequence : std::bool_constant>, + alloy::is_tuple_like>, has_size >> {}; @@ -64,7 +61,7 @@ constexpr bool is_size_one_sequence_v = is_size_one_sequence::value; template struct is_size_one_view : std::bool_constant>, + alloy::is_tuple_like_view>, has_size >> {}; @@ -86,7 +83,7 @@ template requires is_size_one_sequence_v> struct synthesized_value { - using type = std::remove_cvref_t::type>; + using type = std::remove_cvref_t>; }; } // iris::x4::traits diff --git a/test/x4/alternative.cpp b/test/x4/alternative.cpp index da0184c64..433ac1d10 100644 --- a/test/x4/alternative.cpp +++ b/test/x4/alternative.cpp @@ -26,9 +26,8 @@ #include -#include -#include -#include +#include +#include #include #include @@ -43,13 +42,15 @@ struct di_include std::string FileName; }; -BOOST_FUSION_ADAPT_STRUCT(di_ignore, - text -) +template<> +struct iris::alloy::adaptor { + using getters_list = make_getters_list<&di_ignore::text>; +}; -BOOST_FUSION_ADAPT_STRUCT(di_include, - FileName -) +template<> +struct iris::alloy::adaptor { + using getters_list = make_getters_list<&di_include::FileName>; +}; struct undefined {}; @@ -130,13 +131,10 @@ TEST_CASE("alternative") // test if alternatives with all components having unused // attributes have an unused attribute - using boost::fusion::vector; - using boost::fusion::at_c; - - vector v; + iris::alloy::tuple v; REQUIRE((parse("abc", char_ >> (omit[char_] | omit[char_]) >> char_, v))); - CHECK((at_c<0>(v) == 'a')); - CHECK((at_c<1>(v) == 'c')); + CHECK((iris::alloy::get<0>(v) == 'a')); + CHECK((iris::alloy::get<1>(v) == 'c')); } { @@ -222,30 +220,30 @@ TEST_CASE("alternative") (void)line; } - // single-element fusion vector tests + // single-element tuple tests { - boost::fusion::vector> fv; + iris::alloy::tuple> fv; REQUIRE(parse("12345", int_ | +char_, fv)); - CHECK(iris::get(boost::fusion::at_c<0>(fv)) == 12345); + CHECK(iris::get(iris::alloy::get<0>(fv)) == 12345); } { - boost::fusion::vector> fvi; + iris::alloy::tuple> fvi; REQUIRE(parse("12345", int_ | int_, fvi)); - CHECK(iris::get(boost::fusion::at_c<0>(fvi)) == 12345); + CHECK(iris::get(iris::alloy::get<0>(fvi)) == 12345); } - // alternative over single element sequences as part of another sequence + // alternative over single element tuple as part of another tuple { constexpr auto key1 = lit("long") >> attr(long()); constexpr auto key2 = lit("char") >> attr(char()); constexpr auto keys = key1 | key2; constexpr auto pair = keys >> lit("=") >> +char_; - boost::fusion::deque, std::string> attr_; + iris::alloy::tuple, std::string> attr_; REQUIRE(parse("long=ABC", pair, attr_)); - CHECK(iris::get_if(&boost::fusion::front(attr_)) != nullptr); - CHECK(iris::get_if(&boost::fusion::front(attr_)) == nullptr); + CHECK(iris::get_if(&iris::alloy::get<0>(attr_)) != nullptr); + CHECK(iris::get_if(&iris::alloy::get<0>(attr_)) == nullptr); } { diff --git a/test/x4/attr.cpp b/test/x4/attr.cpp index b2a0463e8..01194ff5c 100644 --- a/test/x4/attr.cpp +++ b/test/x4/attr.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/test/x4/attribute.cpp b/test/x4/attribute.cpp index 3739107b7..2dee8dbd9 100644 --- a/test/x4/attribute.cpp +++ b/test/x4/attribute.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/test/x4/attribute_type_check.cpp b/test/x4/attribute_type_check.cpp index e153f446a..198b6e75f 100644 --- a/test/x4/attribute_type_check.cpp +++ b/test/x4/attribute_type_check.cpp @@ -13,9 +13,7 @@ #include #include -#include -#include -#include +#include #include #include @@ -99,7 +97,7 @@ void gen_tests(Values const&... values) { gen_single_item_tests(values...); - boost::fusion::vector attribute = boost::fusion::make_vector(values...); + iris::alloy::tuple attribute(values...); gen_sequence_tests(attribute, values...); } @@ -111,13 +109,13 @@ void make_test(Attributes const&... attrs) gen_tests(attrs...); gen_tests< std::optional..., - boost::fusion::vector... + iris::alloy::tuple... >(attrs..., attrs...); gen_tests< - std::optional>..., - boost::fusion::vector>... - >(boost::fusion::vector(attrs)..., attrs...); + std::optional>..., + iris::alloy::tuple>... + >(iris::alloy::tuple(attrs)..., attrs...); } } // anonymous diff --git a/test/x4/container_support.cpp b/test/x4/container_support.cpp index c6ea8ccee..0722b7425 100644 --- a/test/x4/container_support.cpp +++ b/test/x4/container_support.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include diff --git a/test/x4/debug.cpp b/test/x4/debug.cpp index 5701e9f52..5d835c645 100644 --- a/test/x4/debug.cpp +++ b/test/x4/debug.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -120,8 +120,8 @@ TEST_CASE("debug") { // std::container attributes - using fs = boost::fusion::vector; - rule> start("start"); + using tpl = iris::alloy::tuple; + rule> start("start"); auto start_def = start = *(int_ >> alpha); CHECK(parse("1 a 2 b 3 c", start_def, space)); diff --git a/test/x4/expect.cpp b/test/x4/expect.cpp index 341ed37a7..648d84fc5 100644 --- a/test/x4/expect.cpp +++ b/test/x4/expect.cpp @@ -48,8 +48,7 @@ #include #include -#include -#include +#include #include #include @@ -313,9 +312,6 @@ TEST_CASE("expect") using x4::shared_symbols; using x4::with; - using boost::fusion::vector; - using boost::fusion::at_c; - IRIS_X4_ASSERT_CONSTEXPR_CTORS(expect['x']); IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_ > char_); @@ -369,27 +365,27 @@ TEST_CASE("expect") // Test that attributes with > (sequences) work just like >> (sequences) { - vector attr; + iris::alloy::tuple attr; TEST_ATTR_SUCCESS_PASS(" a\n b\n c", char_ > char_ > char_, space, attr); - CHECK((at_c<0>(attr) == 'a')); - CHECK((at_c<1>(attr) == 'b')); - CHECK((at_c<2>(attr) == 'c')); + CHECK((iris::alloy::get<0>(attr) == 'a')); + CHECK((iris::alloy::get<1>(attr) == 'b')); + CHECK((iris::alloy::get<2>(attr) == 'c')); } { - vector attr; + iris::alloy::tuple attr; TEST_ATTR_SUCCESS_PASS(" a\n b\n c", char_ > char_ >> char_, space, attr); - CHECK((at_c<0>(attr) == 'a')); - CHECK((at_c<1>(attr) == 'b')); - CHECK((at_c<2>(attr) == 'c')); + CHECK((iris::alloy::get<0>(attr) == 'a')); + CHECK((iris::alloy::get<1>(attr) == 'b')); + CHECK((iris::alloy::get<2>(attr) == 'c')); } { - vector attr; + iris::alloy::tuple attr; TEST_ATTR_SUCCESS_PASS(" a, b, c", char_ >> ',' > char_ >> ',' > char_, space, attr); - CHECK((at_c<0>(attr) == 'a')); - CHECK((at_c<1>(attr) == 'b')); - CHECK((at_c<2>(attr) == 'c')); + CHECK((iris::alloy::get<0>(attr) == 'a')); + CHECK((iris::alloy::get<1>(attr) == 'b')); + CHECK((iris::alloy::get<2>(attr) == 'c')); } { diff --git a/test/x4/int.cpp b/test/x4/int.cpp index 9f3ac3fc9..9f92817ff 100644 --- a/test/x4/int.cpp +++ b/test/x4/int.cpp @@ -14,8 +14,7 @@ #include #include -#include -#include +#include #include @@ -232,11 +231,11 @@ TEST_CASE("int") CHECK(parse("-12", int2, i)); } - // single-element fusion vector tests + // single-element tuple tests { - boost::fusion::vector i{}; + iris::alloy::tuple i{}; REQUIRE(parse("-123456", int_, i)); - CHECK(boost::fusion::at_c<0>(i) == -123456); + CHECK(iris::alloy::get<0>(i) == -123456); } } diff --git a/test/x4/lit.cpp b/test/x4/lit.cpp index 6312820d0..0bd8026bb 100644 --- a/test/x4/lit.cpp +++ b/test/x4/lit.cpp @@ -16,8 +16,7 @@ #include #include -#include -#include +#include #include @@ -148,9 +147,9 @@ TEST_CASE("lit") } { - // single-element fusion vector tests - boost::fusion::vector s; + // single-element tuple tests + iris::alloy::tuple s; REQUIRE(parse("kimpo", x4::standard::string("kimpo"), s)); - CHECK(boost::fusion::at_c<0>(s) == "kimpo"); + CHECK(iris::alloy::get<0>(s) == "kimpo"); } } diff --git a/test/x4/omit.cpp b/test/x4/omit.cpp index 9d09141d5..538c33ba4 100644 --- a/test/x4/omit.cpp +++ b/test/x4/omit.cpp @@ -17,8 +17,7 @@ #include #include -#include -#include +#include #include @@ -44,9 +43,6 @@ TEST_CASE("omit") using x4::int_; using x4::_attr; - using boost::fusion::vector; - using boost::fusion::at_c; - IRIS_X4_ASSERT_CONSTEXPR_CTORS(omit['x']); CHECK(parse("a", omit['a'])); @@ -60,8 +56,8 @@ TEST_CASE("omit") { // If all elements except 1 is omitted, the attribute is - // a single-element sequence. For this case alone, we allow - // naked attributes (unwrapped in a fusion sequence). + // a single-element tuple. For this case alone, we allow + // naked attributes. char attr{}; REQUIRE(parse("abc", omit[char_] >> 'b' >> char_, attr)); CHECK(attr == 'c'); @@ -69,7 +65,7 @@ TEST_CASE("omit") { // omit[] means we don't receive the attribute - vector<> attr; + iris::alloy::tuple<> attr; CHECK(parse("abc", omit[char_] >> omit['b'] >> omit[char_], attr)); } @@ -85,18 +81,18 @@ TEST_CASE("omit") // omit[] means we don't receive the attribute, if all elements of a // sequence have unused attributes, the whole sequence has an unused // attribute as well - vector attr; + iris::alloy::tuple attr; REQUIRE(parse("abcde", char_ >> (omit[char_] >> omit['c'] >> omit[char_]) >> char_, attr)); - CHECK(at_c<0>(attr) == 'a'); - CHECK(at_c<1>(attr) == 'e'); + CHECK(iris::alloy::get<0>(attr) == 'a'); + CHECK(iris::alloy::get<1>(attr) == 'e'); } { // "hello" has an unused_type. unused attrubutes are not part of the sequence - vector attr; + iris::alloy::tuple attr; REQUIRE(parse("a hello c", char_ >> "hello" >> char_, space, attr)); - CHECK(at_c<0>(attr) == 'a'); - CHECK(at_c<1>(attr) == 'c'); + CHECK(iris::alloy::get<0>(attr) == 'a'); + CHECK(iris::alloy::get<1>(attr) == 'c'); } { diff --git a/test/x4/optional.cpp b/test/x4/optional.cpp index 4ff1bb769..20db6000d 100644 --- a/test/x4/optional.cpp +++ b/test/x4/optional.cpp @@ -18,9 +18,8 @@ #include #include -#include -#include -#include +#include +#include #include #include @@ -37,9 +36,10 @@ struct adata std::optional b; }; -BOOST_FUSION_ADAPT_STRUCT(adata, - a, b -) +template<> +struct iris::alloy::adaptor { + using getters_list = make_getters_list<&adata::a, &adata::b>; +}; namespace { @@ -94,8 +94,6 @@ TEST_CASE("optional") { // test propagation of unused - using boost::fusion::at_c; - using boost::fusion::vector; // optional of `unused_type` { @@ -107,10 +105,10 @@ TEST_CASE("optional") static_assert(!x4::parser_traits>::has_attribute); static_assert(std::same_as>::attribute_type, unused_type>); - vector v; + iris::alloy::tuple v; REQUIRE(parse("a1234c", char_ >> -omit[int_] >> char_, v)); - CHECK(at_c<0>(v) == 'a'); - CHECK(at_c<1>(v) == 'c'); + CHECK(iris::alloy::get<0>(v) == 'a'); + CHECK(iris::alloy::get<1>(v) == 'c'); } // optional of `unused_container_type` { @@ -134,10 +132,10 @@ TEST_CASE("optional") } } { - vector v; + iris::alloy::tuple v; REQUIRE(parse("a1234c", char_ >> omit[-int_] >> char_, v)); - CHECK(at_c<0>(v) == 'a'); - CHECK(at_c<1>(v) == 'c'); + CHECK(iris::alloy::get<0>(v) == 'a'); + CHECK(iris::alloy::get<1>(v) == 'c'); } { diff --git a/test/x4/plus.cpp b/test/x4/plus.cpp index 12abab392..b4703f2d4 100644 --- a/test/x4/plus.cpp +++ b/test/x4/plus.cpp @@ -18,8 +18,7 @@ #include #include -#include -#include +#include #include #include @@ -134,11 +133,11 @@ TEST_CASE("plus") (void)parse("abcde", +char_, x); } - // single-element fusion vector tests + // single-element tuple tests { - boost::fusion::vector fs; + iris::alloy::tuple fs; REQUIRE(parse("12345", +char_, fs)); - CHECK(boost::fusion::at_c<0>(fs) == "12345"); + CHECK(iris::alloy::get<0>(fs) == "12345"); } { diff --git a/test/x4/raw.cpp b/test/x4/raw.cpp index 010c0b7f4..d7e7a08ac 100644 --- a/test/x4/raw.cpp +++ b/test/x4/raw.cpp @@ -22,7 +22,7 @@ #include -#include +#include #include #include diff --git a/test/x4/rule3.cpp b/test/x4/rule3.cpp index 6b2442f56..74bc185f7 100644 --- a/test/x4/rule3.cpp +++ b/test/x4/rule3.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -85,7 +85,10 @@ struct recursive_tuple std::vector children; }; -BOOST_FUSION_ADAPT_STRUCT(recursive_tuple, value, children) +template<> +struct iris::alloy::adaptor { + using getters_list = make_getters_list<&recursive_tuple::value, &recursive_tuple::children>; +}; // regression test for #461 namespace check_recursive_tuple { diff --git a/test/x4/rule4.cpp b/test/x4/rule4.cpp index cf071a44d..7a42b46ed 100644 --- a/test/x4/rule4.cpp +++ b/test/x4/rule4.cpp @@ -18,8 +18,7 @@ #include -#include -#include +#include #include #include @@ -169,15 +168,13 @@ TEST_CASE("rule4") CHECK(*ov == 1); } - // test handling of single element fusion sequences + // test handling of single element tuple { - using boost::fusion::vector; - using boost::fusion::at_c; - auto r = rule>{} = int_; + auto r = rule>{} = int_; - vector v(0); + iris::alloy::tuple v(0); REQUIRE(parse("1", r, v)); - CHECK(at_c<0>(v) == 1); + CHECK(iris::alloy::get<0>(v) == 1); } // attribute compatibility test diff --git a/test/x4/sequence.cpp b/test/x4/sequence.cpp index c0f9e4bd2..a372a4e48 100644 --- a/test/x4/sequence.cpp +++ b/test/x4/sequence.cpp @@ -28,10 +28,7 @@ #include -#include -#include -#include -#include +#include #include #include @@ -56,10 +53,6 @@ TEST_CASE("sequence") using x4::_attr; using x4::eps; - using boost::fusion::vector; - using boost::fusion::deque; - using boost::fusion::at_c; - IRIS_X4_ASSERT_CONSTEXPR_CTORS(char_ >> char_); CHECK(parse("aa", char_ >> char_)); @@ -76,42 +69,42 @@ TEST_CASE("sequence") CHECK(parse(" Hello, World", lit("Hello") >> ',' >> "World", space)); { - vector vec; + iris::alloy::tuple vec; REQUIRE(parse("ab", char_ >> char_, vec)); - CHECK(at_c<0>(vec) == 'a'); - CHECK(at_c<1>(vec) == 'b'); + CHECK(iris::alloy::get<0>(vec) == 'a'); + CHECK(iris::alloy::get<1>(vec) == 'b'); } { - vector vec; + iris::alloy::tuple vec; REQUIRE(parse(" a\n b\n c", char_ >> char_ >> char_, space, vec)); - CHECK(at_c<0>(vec) == 'a'); - CHECK(at_c<1>(vec) == 'b'); - CHECK(at_c<2>(vec) == 'c'); + CHECK(iris::alloy::get<0>(vec) == 'a'); + CHECK(iris::alloy::get<1>(vec) == 'b'); + CHECK(iris::alloy::get<2>(vec) == 'c'); } { // 'b' has an unused_type. unused attributes are not part of the sequence - vector vec; + iris::alloy::tuple vec; REQUIRE(parse("abc", char_ >> 'b' >> char_, vec)); - CHECK(at_c<0>(vec) == 'a'); - CHECK(at_c<1>(vec) == 'c'); + CHECK(iris::alloy::get<0>(vec) == 'a'); + CHECK(iris::alloy::get<1>(vec) == 'c'); } { // 'b' has an unused_type. unused attributes are not part of the sequence - vector vec; + iris::alloy::tuple vec; REQUIRE(parse("acb", char_ >> char_ >> 'b', vec)); - CHECK(at_c<0>(vec) == 'a'); - CHECK(at_c<1>(vec) == 'c'); + CHECK(iris::alloy::get<0>(vec) == 'a'); + CHECK(iris::alloy::get<1>(vec) == 'c'); } { // "hello" has an unused_type. unused attributes are not part of the sequence - vector vec; + iris::alloy::tuple vec; REQUIRE(parse("a hello c", char_ >> "hello" >> char_, space, vec)); - CHECK(at_c<0>(vec) == 'a'); - CHECK(at_c<1>(vec) == 'c'); + CHECK(iris::alloy::get<0>(vec) == 'a'); + CHECK(iris::alloy::get<1>(vec) == 'c'); } { @@ -122,10 +115,10 @@ TEST_CASE("sequence") } { - // a single element fusion sequence - vector vec; + // a single element tuple + iris::alloy::tuple vec; REQUIRE(parse("ab", char_ >> 'b', vec)); - CHECK(at_c<0>(vec) == 'a'); + CHECK(iris::alloy::get<0>(vec) == 'a'); } { @@ -134,16 +127,15 @@ TEST_CASE("sequence") // actually the issue here is that if the rhs in this case a rule // (r), it should get it (i.e. the sequence parser should not // unwrap it). It's odd that the RHS (r) does not really have a - // single element tuple (it's a deque), so the original - // comment is not accurate. + // single element tuple, so the original comment is not accurate. - using attr_type = deque; - attr_type fv; + using attr_type = iris::alloy::tuple; + attr_type tpl; auto r = rule{} = char_ >> ',' >> int_; - REQUIRE(parse("test:x,1", "test:" >> r, fv)); - CHECK((fv == attr_type('x', 1))); + REQUIRE(parse("test:x,1", "test:" >> r, tpl)); + CHECK((tpl == attr_type('x', 1))); } { @@ -151,13 +143,13 @@ TEST_CASE("sequence") // has a single element tuple as its attribute. This is a correction // of the test above. - using attr_type = deque; - attr_type fv; + using attr_type = iris::alloy::tuple; + attr_type tpl; auto r = rule{} = int_; - REQUIRE(parse("test:1", "test:" >> r, fv)); - CHECK((fv == attr_type(1))); + REQUIRE(parse("test:1", "test:" >> r, tpl)); + CHECK((tpl == attr_type(1))); } // unused means we don't care about the attribute @@ -344,33 +336,33 @@ TEST_CASE("sequence") // Test from spirit mailing list // "Error with container within sequence" { - using attr_type = vector; + using attr_type = iris::alloy::tuple; attr_type vec; constexpr auto r = *alnum; REQUIRE(parse("abcdef", r, vec)); - CHECK(at_c<0>(vec) == "abcdef"); + CHECK(iris::alloy::get<0>(vec) == "abcdef"); } { - using attr_type = vector>; + using attr_type = iris::alloy::tuple>; attr_type vec; constexpr auto r = *int_; REQUIRE(parse("123 456", r, space, vec)); - REQUIRE(at_c<0>(vec).size() == 2); - CHECK(at_c<0>(vec)[0] == 123); - CHECK(at_c<0>(vec)[1] == 456); + REQUIRE(iris::alloy::get<0>(vec).size() == 2); + CHECK(iris::alloy::get<0>(vec)[0] == 123); + CHECK(iris::alloy::get<0>(vec)[1] == 456); } { // Non-flat optional - vector>> v; + iris::alloy::tuple>> v; constexpr auto p = int_ >> -(':' >> int_ >> '-' >> int_); REQUIRE(parse("1:2-3", p, v)); - REQUIRE(at_c<1>(v).has_value()); - CHECK(at_c<0>(*at_c<1>(v)) == 2); + REQUIRE(iris::alloy::get<1>(v).has_value()); + CHECK(iris::alloy::get<0>(*iris::alloy::get<1>(v)) == 2); } // optional with container attribute @@ -378,15 +370,15 @@ TEST_CASE("sequence") constexpr auto p = char_ >> -(':' >> +char_); { - vector> v; + iris::alloy::tuple> v; REQUIRE(parse("x", p, v)); - CHECK(!at_c<1>(v).has_value()); + CHECK(!iris::alloy::get<1>(v).has_value()); } { - vector> v; + iris::alloy::tuple> v; REQUIRE(parse("x:abc", p, v)); - REQUIRE(at_c<1>(v).has_value()); - CHECK(*at_c<1>(v) == "abc"); + REQUIRE(iris::alloy::get<1>(v).has_value()); + CHECK(*iris::alloy::get<1>(v) == "abc"); } } @@ -418,8 +410,8 @@ TEST_CASE("sequence") char c = 0; int n = 0; auto f = [&](auto&& ctx) { - c = at_c<0>(_attr(ctx)); - n = at_c<1>(_attr(ctx)); + c = iris::alloy::get<0>(_attr(ctx)); + n = iris::alloy::get<1>(_attr(ctx)); }; REQUIRE(parse("x123\"a string\"", (char_ >> int_ >> "\"a string\"")[f])); @@ -432,8 +424,8 @@ TEST_CASE("sequence") char c = 0; int n = 0; auto f = [&](auto&& ctx) { - c = at_c<0>(_attr(ctx)); - n = at_c<1>(_attr(ctx)); + c = iris::alloy::get<0>(_attr(ctx)); + n = iris::alloy::get<1>(_attr(ctx)); }; REQUIRE(parse("x 123 \"a string\"", (char_ >> int_ >> "\"a string\"")[f], space)); diff --git a/test/x4/symbols3.cpp b/test/x4/symbols3.cpp index fd2fa5ad4..7c55cb506 100644 --- a/test/x4/symbols3.cpp +++ b/test/x4/symbols3.cpp @@ -18,9 +18,8 @@ #include #include -#include -#include -#include +#include +#include #include #include @@ -32,9 +31,10 @@ struct roman std::optional c; }; -BOOST_FUSION_ADAPT_STRUCT(roman, - a, b, c -) +template<> +struct iris::alloy::adaptor { + using getters_list = make_getters_list<&roman::a, &roman::b, &roman::c>; +}; namespace { From cb646b32de2e56c3dac18a296a460dd13aee8ce3 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 15:36:19 +0900 Subject: [PATCH 10/41] Restore mpl --- .github/workflows/ci.yml | 5 +++++ CMakeLists.txt | 7 +++++++ README.md | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0ec02103..cca0fffe4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -204,9 +204,14 @@ jobs: libs/assert \ libs/config \ libs/core \ + libs/io \ + libs/mpl \ + libs/predef \ libs/preprocessor \ libs/static_assert \ + libs/type_traits \ libs/throw_exception \ + libs/utilty - name: Build upstream Boost libraries (Ubuntu) if: matrix.os.name == 'ubuntu' && steps.cache-boost.outputs.cache-hit != 'true' diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f0341ee9..0579d268a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,13 @@ list(APPEND iris_x4_boost_deps config) list(APPEND iris_x4_boost_deps static_assert) list(APPEND iris_x4_boost_deps throw_exception) +# Everything required by `mpl` +list(APPEND iris_x4_boost_deps mpl) +list(APPEND iris_x4_boost_deps io) +list(APPEND iris_x4_boost_deps predef) +list(APPEND iris_x4_boost_deps type_traits) +list(APPEND iris_x4_boost_deps utility) + # --------------------------------------------- list(REMOVE_DUPLICATES iris_x4_boost_deps) diff --git a/README.md b/README.md index 44a2ba390..7cd70602d 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,8 @@ Note: Boost dependency is going to be removed entirely in the near future. ```console git submodule update --init --depth 1 --recursive -- \ tools/build tools/boost_install libs/assert libs/config \ - libs/core libs/preprocessor libs/static_assert libs/throw_exception + libs/core libs/io libs/mpl libs/predef libs/preprocessor \ + libs/static_assert libs/type_traits libs/throw_exception libs/utility # Linux ./bootstrap.sh From 4a02fcd04033d1ab60bd82026de7acb4590e45b5 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 15:46:11 +0900 Subject: [PATCH 11/41] Sort deps --- .github/workflows/ci.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cca0fffe4..21a6acd21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -209,8 +209,8 @@ jobs: libs/predef \ libs/preprocessor \ libs/static_assert \ - libs/type_traits \ libs/throw_exception \ + libs/type_traits \ libs/utilty - name: Build upstream Boost libraries (Ubuntu) diff --git a/README.md b/README.md index 7cd70602d..0e2e000fa 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Note: Boost dependency is going to be removed entirely in the near future. git submodule update --init --depth 1 --recursive -- \ tools/build tools/boost_install libs/assert libs/config \ libs/core libs/io libs/mpl libs/predef libs/preprocessor \ - libs/static_assert libs/type_traits libs/throw_exception libs/utility + libs/static_assert libs/throw_exception libs/type_traits libs/utility # Linux ./bootstrap.sh From 6f0d0a30530ce5242afcc89ea286a9ea64509191 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 15:46:51 +0900 Subject: [PATCH 12/41] Fix typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21a6acd21..94ec09d1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -211,7 +211,7 @@ jobs: libs/static_assert \ libs/throw_exception \ libs/type_traits \ - libs/utilty + libs/utility - name: Build upstream Boost libraries (Ubuntu) if: matrix.os.name == 'ubuntu' && steps.cache-boost.outputs.cache-hit != 'true' From 62ea07b1e6e79cf5ee02d684fb9c38c1c7ccf85f Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 16:09:33 +0900 Subject: [PATCH 13/41] Remove some detail features --- include/iris/alloy/detail/forward_like_t.hpp | 38 --- include/iris/alloy/detail/pack_indexing.hpp | 84 ------ .../alloy/detail/preprocessed/tuple_impl.hpp | 260 +++++++++--------- .../detail/preprocessed/tuple_impl.hpp.in | 4 +- include/iris/alloy/detail/tuple_impl.hpp | 20 +- include/iris/alloy/traits.hpp | 5 +- include/iris/alloy/tuple.hpp | 6 +- 7 files changed, 146 insertions(+), 271 deletions(-) delete mode 100644 include/iris/alloy/detail/forward_like_t.hpp delete mode 100644 include/iris/alloy/detail/pack_indexing.hpp diff --git a/include/iris/alloy/detail/forward_like_t.hpp b/include/iris/alloy/detail/forward_like_t.hpp deleted file mode 100644 index c857e71b5..000000000 --- a/include/iris/alloy/detail/forward_like_t.hpp +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef IRIS_ALLOY_DETAIL_FORWARD_LIKE_T_HPP -#define IRIS_ALLOY_DETAIL_FORWARD_LIKE_T_HPP - -/*============================================================================= - Copyright (c) 2025 Yaito Kakeyama - Copyright (c) 2026 The Iris Project Contributors - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -==============================================================================*/ - -#include - -namespace iris::alloy::detail { - -// Clang workaround; as code below does not work unless -fno-builtin-std-forward_like is specified -// ``` -// template -// using forward_like_t = decltype(std::forward_like(std::declval())); -// ``` -template -using forward_like_t = std::conditional_t< - std::is_rvalue_reference_v, - std::conditional_t< - std::is_const_v>, - std::remove_cvref_t const, - std::remove_cvref_t - >&&, - std::conditional_t< - std::is_const_v>, - std::remove_cvref_t const, - std::remove_cvref_t - >& ->; - -} // iris::alloy::detail - -#endif diff --git a/include/iris/alloy/detail/pack_indexing.hpp b/include/iris/alloy/detail/pack_indexing.hpp deleted file mode 100644 index 53b7b74a2..000000000 --- a/include/iris/alloy/detail/pack_indexing.hpp +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef IRIS_ALLOY_DETAIL_PACK_INDEXING_HPP -#define IRIS_ALLOY_DETAIL_PACK_INDEXING_HPP - -/*============================================================================= - Copyright (c) 2025 Yaito Kakeyama - Copyright (c) 2026 The Iris Project Contributors - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -==============================================================================*/ - -#include - -#include - -namespace iris::alloy::detail { - -template -struct type_pack_indexing; - -template -using type_pack_indexing_t = typename type_pack_indexing::type; - -#if __cpp_pack_indexing >= 202311L - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wc++26-extensions" - -template -struct type_pack_indexing -{ - using type = Ts...[I]; -}; - -#pragma clang diagnostic pop - -#else - -template -struct type_pack_indexing<0, T, Ts...> -{ - using type = T; -}; - -template -struct type_pack_indexing : type_pack_indexing {}; - -#endif - -template -struct non_type_pack_indexing; - -template -inline constexpr auto non_type_pack_indexing_v = non_type_pack_indexing::value; - -#if __cpp_pack_indexing >= 202311L - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wc++26-extensions" - -template -struct non_type_pack_indexing -{ - static constexpr auto value = Vs...[I]; -}; - -#pragma clang diagnostic pop - -#else - -template -struct non_type_pack_indexing<0, V, Vs...> -{ - static constexpr auto value = V; -}; - -template -struct non_type_pack_indexing : non_type_pack_indexing {}; - -#endif - -} // iris::alloy::detail - -#endif diff --git a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp index 4926f0e4d..99190e13f 100644 --- a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp +++ b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp @@ -11,12 +11,12 @@ #include -#include -#include #include #include +#include + #include #include @@ -128,25 +128,25 @@ class tuple_impl swap(_0, other._0); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -254,7 +254,7 @@ class tuple_impl swap(_1, other._1); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -262,7 +262,7 @@ class tuple_impl return _1; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -270,7 +270,7 @@ class tuple_impl return _1; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -278,7 +278,7 @@ class tuple_impl return static_cast(_1); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -400,7 +400,7 @@ class tuple_impl swap(_2, other._2); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -410,7 +410,7 @@ class tuple_impl return _2; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -420,7 +420,7 @@ class tuple_impl return _2; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -430,7 +430,7 @@ class tuple_impl return static_cast(_2); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -571,7 +571,7 @@ class tuple_impl swap(_3, other._3); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -583,7 +583,7 @@ class tuple_impl return _3; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -595,7 +595,7 @@ class tuple_impl return _3; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -607,7 +607,7 @@ class tuple_impl return static_cast(_3); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -761,7 +761,7 @@ class tuple_impl swap(_4, other._4); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -775,7 +775,7 @@ class tuple_impl return _4; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -789,7 +789,7 @@ class tuple_impl return _4; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -803,7 +803,7 @@ class tuple_impl return static_cast(_4); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -967,7 +967,7 @@ class tuple_impl swap(_5, other._5); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -983,7 +983,7 @@ class tuple_impl return _5; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -999,7 +999,7 @@ class tuple_impl return _5; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -1015,7 +1015,7 @@ class tuple_impl return static_cast(_5); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -1202,7 +1202,7 @@ class tuple_impl swap(_6, other._6); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -1220,7 +1220,7 @@ class tuple_impl return _6; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -1238,7 +1238,7 @@ class tuple_impl return _6; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -1256,7 +1256,7 @@ class tuple_impl return static_cast(_6); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -1452,7 +1452,7 @@ class tuple_impl swap(_7, other._7); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -1472,7 +1472,7 @@ class tuple_impl return _7; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -1492,7 +1492,7 @@ class tuple_impl return _7; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -1512,7 +1512,7 @@ class tuple_impl return static_cast(_7); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -1719,7 +1719,7 @@ class tuple_impl swap(_8, other._8); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -1741,7 +1741,7 @@ class tuple_impl return _8; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -1763,7 +1763,7 @@ class tuple_impl return _8; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -1785,7 +1785,7 @@ class tuple_impl return static_cast(_8); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -2014,7 +2014,7 @@ class tuple_impl swap(_9, other._9); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -2038,7 +2038,7 @@ class tuple_impl return _9; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -2062,7 +2062,7 @@ class tuple_impl return _9; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -2086,7 +2086,7 @@ class tuple_impl return static_cast(_9); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -2327,7 +2327,7 @@ class tuple_impl swap(_10, other._10); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -2353,7 +2353,7 @@ class tuple_impl return _10; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -2379,7 +2379,7 @@ class tuple_impl return _10; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -2405,7 +2405,7 @@ class tuple_impl return static_cast(_10); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -2657,7 +2657,7 @@ class tuple_impl swap(_11, other._11); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -2685,7 +2685,7 @@ class tuple_impl return _11; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -2713,7 +2713,7 @@ class tuple_impl return _11; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -2741,7 +2741,7 @@ class tuple_impl return static_cast(_11); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -3015,7 +3015,7 @@ class tuple_impl swap(_12, other._12); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -3045,7 +3045,7 @@ class tuple_impl return _12; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -3075,7 +3075,7 @@ class tuple_impl return _12; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -3105,7 +3105,7 @@ class tuple_impl return static_cast(_12); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -3390,7 +3390,7 @@ class tuple_impl swap(_13, other._13); } template - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -3422,7 +3422,7 @@ class tuple_impl return _13; } template - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -3454,7 +3454,7 @@ class tuple_impl return _13; } template - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -3486,7 +3486,7 @@ class tuple_impl return static_cast(_13); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -3790,7 +3790,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -3824,7 +3824,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -3858,7 +3858,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -3892,7 +3892,7 @@ class tuple_impl(_14); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -4219,7 +4219,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -4255,7 +4255,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -4291,7 +4291,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -4327,7 +4327,7 @@ class tuple_impl(_15); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -4665,7 +4665,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -4703,7 +4703,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -4741,7 +4741,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -4779,7 +4779,7 @@ class tuple_impl(_16); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -5126,7 +5126,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -5166,7 +5166,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -5206,7 +5206,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -5246,7 +5246,7 @@ class tuple_impl(_17); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -5615,7 +5615,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -5657,7 +5657,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -5699,7 +5699,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -5741,7 +5741,7 @@ class tuple_impl(_18); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -6122,7 +6122,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -6166,7 +6166,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -6210,7 +6210,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -6254,7 +6254,7 @@ class tuple_impl(_19); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -6649,7 +6649,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -6695,7 +6695,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) @@ -6742,7 +6742,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -6788,7 +6788,7 @@ class tuple_impl(_20); } template - constexpr type_pack_indexing_t const&& + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) @@ -7208,7 +7208,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -7256,7 +7256,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) @@ -7305,7 +7305,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -7353,7 +7353,7 @@ class tuple_impl(_21); } template - constexpr type_pack_indexing_t const&& + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) @@ -7786,7 +7786,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -7836,7 +7836,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) @@ -7887,7 +7887,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) @@ -7938,7 +7938,7 @@ class tuple_impl(_22); } template - constexpr type_pack_indexing_t const&& + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) @@ -8387,7 +8387,7 @@ class tuple_impl - constexpr type_pack_indexing_t& + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) @@ -8440,7 +8440,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) @@ -8493,7 +8493,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) @@ -8546,7 +8546,7 @@ class tuple_impl(_23); } template - constexpr type_pack_indexing_t const&& + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) @@ -9018,7 +9018,7 @@ class tuple_impl - constexpr type_pack_indexing_t& + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) @@ -9073,7 +9073,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) @@ -9128,7 +9128,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) @@ -9183,7 +9183,7 @@ class tuple_impl(_24); } template - constexpr type_pack_indexing_t const&& + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) @@ -9665,7 +9665,7 @@ class tuple_impl - constexpr type_pack_indexing_t& + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) @@ -9722,7 +9722,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept { @@ -9780,7 +9780,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) @@ -9837,7 +9837,7 @@ class tuple_impl(_25); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept { @@ -10331,7 +10331,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept { @@ -10391,7 +10391,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept { @@ -10451,7 +10451,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept { @@ -10511,7 +10511,7 @@ class tuple_impl(_26); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept { @@ -11035,7 +11035,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept { @@ -11097,7 +11097,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept { @@ -11159,7 +11159,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept { @@ -11221,7 +11221,7 @@ class tuple_impl(_27); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept { @@ -11757,7 +11757,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept { @@ -11821,7 +11821,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept { @@ -11885,7 +11885,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept { @@ -11949,7 +11949,7 @@ class tuple_impl(_28); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept { @@ -12498,7 +12498,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept { @@ -12564,7 +12564,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept { @@ -12630,7 +12630,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept { @@ -12696,7 +12696,7 @@ class tuple_impl(_29); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept { @@ -13266,7 +13266,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept { @@ -13334,7 +13334,7 @@ class tuple_impl - constexpr type_pack_indexing_t const& get() const& noexcept { @@ -13402,7 +13402,7 @@ class tuple_impl - constexpr type_pack_indexing_t&& get() && noexcept { @@ -13470,7 +13470,7 @@ class tuple_impl(_30); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept { @@ -14071,7 +14071,7 @@ class tuple_impl - constexpr type_pack_indexing_t& get() & noexcept { @@ -14143,7 +14143,7 @@ class tuple_impl(); } template - constexpr type_pack_indexing_t const& get() const& noexcept { @@ -14215,7 +14215,7 @@ class tuple_impl(); } template - constexpr type_pack_indexing_t&& get() && noexcept { @@ -14287,7 +14287,7 @@ class tuple_impl(); } template - constexpr type_pack_indexing_t const&& get() const&& noexcept { diff --git a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in index 97651c3e9..6c6acd31d 100644 --- a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in +++ b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in @@ -11,12 +11,12 @@ #include -#include -#include #include #include +#include + #include #include diff --git a/include/iris/alloy/detail/tuple_impl.hpp b/include/iris/alloy/detail/tuple_impl.hpp index bca94a034..2abf3a83e 100644 --- a/include/iris/alloy/detail/tuple_impl.hpp +++ b/include/iris/alloy/detail/tuple_impl.hpp @@ -13,12 +13,12 @@ #include -#include -#include #include #include +#include + #include #include @@ -266,26 +266,26 @@ class tuple_impl<> } \ \ template \ - constexpr type_pack_indexing_t& get() & noexcept \ + constexpr pack_indexing_t& get() & noexcept \ { \ BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_LVALUE_GET, ) \ } \ \ template \ - constexpr type_pack_indexing_t const& \ + constexpr pack_indexing_t const& \ get() const& noexcept \ { \ BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_LVALUE_GET, ) \ } \ \ template \ - constexpr type_pack_indexing_t&& get() && noexcept \ + constexpr pack_indexing_t&& get() && noexcept \ { \ BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_FORWARDING_GET, ) \ } \ \ template \ - constexpr type_pack_indexing_t const&& \ + constexpr pack_indexing_t const&& \ get() const&& noexcept \ { \ BOOST_PP_REPEAT(n, IRIS_ALLOY_DETAIL_FORWARDING_GET, const) \ @@ -444,7 +444,7 @@ class tuple_impl - constexpr type_pack_indexing_t< + constexpr pack_indexing_t< I, BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ARGS, IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_1), Ts... @@ -456,7 +456,7 @@ class tuple_impl - constexpr type_pack_indexing_t< + constexpr pack_indexing_t< I, BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ARGS, IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_1), Ts... @@ -468,7 +468,7 @@ class tuple_impl - constexpr type_pack_indexing_t< + constexpr pack_indexing_t< I, BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ARGS, IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_1), Ts... @@ -480,7 +480,7 @@ class tuple_impl - constexpr type_pack_indexing_t< + constexpr pack_indexing_t< I, BOOST_PP_REPEAT(IRIS_ALLOY_TUPLE_LIMIT, IRIS_ALLOY_DETAIL_ARGS, IRIS_ALLOY_DETAIL_TEMPLATE_PARAM_1), Ts... diff --git a/include/iris/alloy/traits.hpp b/include/iris/alloy/traits.hpp index 1e9b69095..afcae7f71 100644 --- a/include/iris/alloy/traits.hpp +++ b/include/iris/alloy/traits.hpp @@ -10,7 +10,6 @@ ==============================================================================*/ #include -#include #include @@ -36,7 +35,7 @@ template struct non_type_list_indexing {}; template class TList, auto... Vs> -struct non_type_list_indexing> : non_type_pack_indexing {}; +struct non_type_list_indexing> : cpack_indexing {}; } // detail @@ -93,7 +92,7 @@ struct tuple_element {}; template struct tuple_element> { - using type = detail::type_pack_indexing_t; + using type = IRIS_CORE_PACK_INDEXING(I, Ts...); }; template diff --git a/include/iris/alloy/tuple.hpp b/include/iris/alloy/tuple.hpp index 650642f49..82c0241d6 100644 --- a/include/iris/alloy/tuple.hpp +++ b/include/iris/alloy/tuple.hpp @@ -19,9 +19,7 @@ #include #endif -#include #include -#include #include #include @@ -59,7 +57,7 @@ struct tuple_traits : tuple_traits_impl, UTuple, template struct tuple_one_element_is_constructible_from_tuple : std::bool_constant<(sizeof...(Ts) == 1) && - (std::is_convertible_v> || std::is_constructible_v, UTuple>)> + (std::is_convertible_v || std::is_constructible_v)> {}; template @@ -77,7 +75,7 @@ class tuple : public detail::tuple_impl template static constexpr bool disambiguating_constraint = []() { if constexpr (sizeof...(Ts) == 1) { - return !std::is_same_v>, tuple>; + return !std::is_same_v, tuple>; } else { return true; } From a81f77348a201922fce532f770e3fb2ac9f68367 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 16:36:58 +0900 Subject: [PATCH 14/41] Add script for preprocess --- .../alloy/detail/preprocessed/.clang-format | 16 +++ .../alloy/detail/preprocessed/tuple_impl.hpp | 112 +++++++++--------- .../detail/preprocessed/tuple_impl.hpp.in | 4 + scripts/generate_tuple_members.sh | 6 + 4 files changed, 80 insertions(+), 58 deletions(-) create mode 100644 include/iris/alloy/detail/preprocessed/.clang-format create mode 100755 scripts/generate_tuple_members.sh diff --git a/include/iris/alloy/detail/preprocessed/.clang-format b/include/iris/alloy/detail/preprocessed/.clang-format new file mode 100644 index 000000000..5727e6fc3 --- /dev/null +++ b/include/iris/alloy/detail/preprocessed/.clang-format @@ -0,0 +1,16 @@ +AccessModifierOffset: -4 +AllowBreakBeforeNoexceptSpecifier: OnlyWithParen +BreakTemplateDeclarations: Yes +ColumnLimit: 160 +FixNamespaceComments: false +IndentWidth: 4 +NamespaceIndentation: None +PointerAlignment: Left +QualifierAlignment: Right +UseTab: Never +AlignEscapedNewlines: DontAlign +BreakBeforeBraces: Mozilla +SpaceAfterTemplateKeyword: false +SpaceBeforeParens: Custom +SpaceBeforeParensOptions: + AfterRequiresInClause: true diff --git a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp index 99190e13f..f58392c42 100644 --- a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp +++ b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp @@ -9,6 +9,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ +#ifndef IRIS_ALLOY_GENERATE_PREPROCESSED + #include #include @@ -21,6 +23,8 @@ #include +#endif + namespace iris::alloy { template class tuple; @@ -6695,8 +6699,7 @@ class tuple_impl - constexpr pack_indexing_t const& - get() const& noexcept + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) return _0; @@ -6788,8 +6791,7 @@ class tuple_impl(_20); } template - constexpr pack_indexing_t const&& - get() const&& noexcept + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) return static_cast(_0); @@ -7887,8 +7889,7 @@ class tuple_impl - constexpr pack_indexing_t&& - get() && noexcept + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) return static_cast(_0); @@ -8387,8 +8388,7 @@ class tuple_impl - constexpr pack_indexing_t& - get() & noexcept + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) return _0; @@ -9722,8 +9722,7 @@ class tuple_impl - constexpr pack_indexing_t const& + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) @@ -9837,8 +9836,7 @@ class tuple_impl(_25); } template - constexpr pack_indexing_t const&& + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) @@ -10331,8 +10329,7 @@ class tuple_impl - constexpr pack_indexing_t& + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) @@ -10392,7 +10389,7 @@ class tuple_impl constexpr pack_indexing_t const& + T26> const& get() const& noexcept { if constexpr (I == 0) @@ -10451,8 +10448,7 @@ class tuple_impl - constexpr pack_indexing_t&& + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) @@ -10512,7 +10508,7 @@ class tuple_impl constexpr pack_indexing_t const&& + T26> const&& get() const&& noexcept { if constexpr (I == 0) @@ -11035,8 +11031,8 @@ class tuple_impl - constexpr pack_indexing_t& + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) @@ -11097,8 +11093,8 @@ class tuple_impl - constexpr pack_indexing_t const& + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) @@ -11159,8 +11155,8 @@ class tuple_impl - constexpr pack_indexing_t&& + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) @@ -11221,8 +11217,8 @@ class tuple_impl(_27); } template - constexpr pack_indexing_t const&& + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) @@ -11757,8 +11753,8 @@ class tuple_impl - constexpr pack_indexing_t& + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) @@ -11821,8 +11817,8 @@ class tuple_impl - constexpr pack_indexing_t const& + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) @@ -11885,8 +11881,8 @@ class tuple_impl - constexpr pack_indexing_t&& + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) @@ -11949,8 +11945,8 @@ class tuple_impl(_28); } template - constexpr pack_indexing_t const&& + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) @@ -12498,8 +12494,8 @@ class tuple_impl - constexpr pack_indexing_t& + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) @@ -12564,8 +12560,8 @@ class tuple_impl - constexpr pack_indexing_t const& + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) @@ -12630,8 +12626,8 @@ class tuple_impl - constexpr pack_indexing_t&& + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) @@ -12696,8 +12692,8 @@ class tuple_impl(_29); } template - constexpr pack_indexing_t const&& + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) @@ -13266,8 +13262,8 @@ class tuple_impl - constexpr pack_indexing_t& + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) @@ -13334,8 +13330,8 @@ class tuple_impl - constexpr pack_indexing_t const& + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) @@ -13402,8 +13398,8 @@ class tuple_impl - constexpr pack_indexing_t&& + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) @@ -13470,8 +13466,8 @@ class tuple_impl(_30); } template - constexpr pack_indexing_t const&& + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) @@ -14071,8 +14067,8 @@ class tuple_impl - constexpr pack_indexing_t& + constexpr pack_indexing_t& get() & noexcept { if constexpr (I == 0) @@ -14143,8 +14139,8 @@ class tuple_impl(); } template - constexpr pack_indexing_t const& + constexpr pack_indexing_t const& get() const& noexcept { if constexpr (I == 0) @@ -14215,8 +14211,8 @@ class tuple_impl(); } template - constexpr pack_indexing_t&& + constexpr pack_indexing_t&& get() && noexcept { if constexpr (I == 0) @@ -14287,8 +14283,8 @@ class tuple_impl(); } template - constexpr pack_indexing_t const&& + constexpr pack_indexing_t const&& get() const&& noexcept { if constexpr (I == 0) diff --git a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in index 6c6acd31d..2c9e77bf4 100644 --- a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in +++ b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in @@ -9,6 +9,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ +#ifndef IRIS_ALLOY_GENERATE_PREPROCESSED + #include #include @@ -21,6 +23,8 @@ #include +#endif + // replace me #endif diff --git a/scripts/generate_tuple_members.sh b/scripts/generate_tuple_members.sh new file mode 100755 index 000000000..2972e3ac5 --- /dev/null +++ b/scripts/generate_tuple_members.sh @@ -0,0 +1,6 @@ +#!/usr/bin/sh +g++ -Iinclude -Imodules/iris/include -E -P -DIRIS_ALLOY_GENERATE_PREPROCESSED include/iris/alloy/detail/tuple_impl.hpp > include/iris/alloy/detail/preprocessed/temp.hpp +cd include/iris/alloy/detail/preprocessed +sed -e '/\/\/ replace me/{r temp.hpp' -e 'd}' tuple_impl.hpp.in > tuple_impl.hpp +clang-format -i tuple_impl.hpp +rm temp.hpp From 4f7b5c8f434858bc11759eddff20e3e02c518497 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 16:55:48 +0900 Subject: [PATCH 15/41] Let CMake generate tuple_impl.hpp on configure step --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0579d268a..f54ffcded 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,15 @@ set_target_properties(iris_alloy PROPERTIES CXX_EXTENSIONS OFF) # ----------------------------------------------------------------- # Configure alloy target +set_property( + DIRECTORY ${PROJECT_SOURCE_DIR} + PROPERTY CMAKE_CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.sh +) +execute_process( + COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.sh + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} +) + file( GLOB_RECURSE IRIS_ALLOY_HEADERS ${PROJECT_SOURCE_DIR}/include/iris/alloy/*.hpp From 36d534ed32bc4c76a915b4a5593a58bb13360f48 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 16:58:12 +0900 Subject: [PATCH 16/41] Fix include --- scripts/generate_tuple_members.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_tuple_members.sh b/scripts/generate_tuple_members.sh index 2972e3ac5..75a9b81a7 100755 --- a/scripts/generate_tuple_members.sh +++ b/scripts/generate_tuple_members.sh @@ -1,5 +1,5 @@ #!/usr/bin/sh -g++ -Iinclude -Imodules/iris/include -E -P -DIRIS_ALLOY_GENERATE_PREPROCESSED include/iris/alloy/detail/tuple_impl.hpp > include/iris/alloy/detail/preprocessed/temp.hpp +g++ -Iinclude -I../preprocessor/include -Imodules/iris/include -E -P -DIRIS_ALLOY_GENERATE_PREPROCESSED include/iris/alloy/detail/tuple_impl.hpp > include/iris/alloy/detail/preprocessed/temp.hpp cd include/iris/alloy/detail/preprocessed sed -e '/\/\/ replace me/{r temp.hpp' -e 'd}' tuple_impl.hpp.in > tuple_impl.hpp clang-format -i tuple_impl.hpp From eb343d6c6df20803cb38618853d0b4cfb6db6634 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 17:54:13 +0900 Subject: [PATCH 17/41] Fix CI error --- include/iris/alloy/detail/preprocessed/.clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/iris/alloy/detail/preprocessed/.clang-format b/include/iris/alloy/detail/preprocessed/.clang-format index 5727e6fc3..066b8bfac 100644 --- a/include/iris/alloy/detail/preprocessed/.clang-format +++ b/include/iris/alloy/detail/preprocessed/.clang-format @@ -1,6 +1,6 @@ AccessModifierOffset: -4 AllowBreakBeforeNoexceptSpecifier: OnlyWithParen -BreakTemplateDeclarations: Yes +AlwaysBreakTemplateDeclarations : true ColumnLimit: 160 FixNamespaceComments: false IndentWidth: 4 From fbcf93958f9add3ae78bf510500b620c4277e06e Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 18:13:19 +0900 Subject: [PATCH 18/41] Remove processed file from repository --- .gitignore | 3 + .../alloy/detail/preprocessed/tuple_impl.hpp | 14361 ---------------- .../detail/preprocessed/tuple_impl.hpp.in | 4 - 3 files changed, 3 insertions(+), 14365 deletions(-) delete mode 100644 include/iris/alloy/detail/preprocessed/tuple_impl.hpp diff --git a/.gitignore b/.gitignore index 7149e71fc..4f84d4746 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ .DS_Store /build*/ + +# ignore preprocessed file +include/iris/alloy/detail/preprocessed/tuple_impl.hpp diff --git a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp deleted file mode 100644 index f58392c42..000000000 --- a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp +++ /dev/null @@ -1,14361 +0,0 @@ -#ifndef IRIS_ALLOY_DETAIL_PREPROCESSED_TUPLE_IMPL_HPP -#define IRIS_ALLOY_DETAIL_PREPROCESSED_TUPLE_IMPL_HPP - -/*============================================================================= - Copyright (c) 2025 Yaito Kakeyama - Copyright (c) 2026 The Iris Project Contributors - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -==============================================================================*/ - -#ifndef IRIS_ALLOY_GENERATE_PREPROCESSED - -#include - -#include - -#include - -#include - -#include - -#include - -#endif - -namespace iris::alloy { -template -class tuple; -template - requires detail::tuple_all_elements_have_equality_operator, tuple> -constexpr bool operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); -namespace detail { -template -class tuple_impl; -template<> -class tuple_impl<> -{ - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const& a, tuple const& b) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - constexpr bool equal_to(tuple_impl const&) const noexcept { return true; } - -public: - tuple_impl() = default; - tuple_impl(tuple_impl const&) = default; - tuple_impl(tuple_impl&&) = default; - constexpr tuple_impl(value_initialize_t) noexcept {} -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const noexcept(std::conjunction_v>) - { - return _0 == other._0; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept(std::conjunction_v>) : _0{} {} - template - constexpr explicit tuple_impl(U0&& u0) noexcept(std::conjunction_v>) : _0(static_cast(u0)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) noexcept(std::conjunction_v>) : _0(other._0) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) noexcept(std::conjunction_v>) : _0(other._0) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) noexcept(std::conjunction_v>) - : _0(static_cast(other)._0) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) noexcept(std::conjunction_v>) - : _0(static_cast(other)._0) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) noexcept(std::conjunction_v>) - { - _0 = other._0; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) noexcept(std::conjunction_v>) - { - _0 = static_cast(other)._0; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) noexcept(std::conjunction_v>) - { - _0 = other._0; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) noexcept(std::conjunction_v>) - { - _0 = static_cast(other)._0; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept(std::conjunction_v>) - { - static_assert(std::conjunction_v>); - using std::swap; - swap(_0, other._0); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) - noexcept(std::conjunction_v, std::is_nothrow_default_constructible>) - : _0{}, _1{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1) noexcept(std::conjunction_v, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) noexcept(std::conjunction_v, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept(std::conjunction_v, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( - std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) - noexcept(std::conjunction_v, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) noexcept(std::conjunction_v, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( - std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( - std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( - std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( - std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( - std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( - std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( - std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) noexcept( - std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert( - std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept(std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) - noexcept(std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert( - std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - _20 = alloy::get<20>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - } - template - constexpr pack_indexing_t const& get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - } - template - constexpr pack_indexing_t const&& get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - IRIS_NO_UNIQUE_ADDRESS T21 _21; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), - _21(static_cast(u21)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - _20 = alloy::get<20>(static_cast(other)); - _21 = alloy::get<21>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - swap(_21, other._21); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - } - template - constexpr pack_indexing_t const& - get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - } - template - constexpr pack_indexing_t const&& - get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool - equal_to(tuple_impl const& other) const noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && - _22 == other._22; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - IRIS_NO_UNIQUE_ADDRESS T21 _21; - IRIS_NO_UNIQUE_ADDRESS T22 _22; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), - _21(static_cast(u21)), _22(static_cast(u22)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22) - { - } - template - constexpr explicit tuple_impl( - tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22) - { - } - template - constexpr explicit tuple_impl( - tuple_impl const&& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - return *this; - } - template - constexpr tuple_impl& - operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - _20 = alloy::get<20>(static_cast(other)); - _21 = alloy::get<21>(static_cast(other)); - _22 = alloy::get<22>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - swap(_21, other._21); - swap(_22, other._22); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - } - template - constexpr pack_indexing_t const& - get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - } - template - constexpr pack_indexing_t&& get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - } - template - constexpr pack_indexing_t const&& - get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool - equal_to(tuple_impl const& other) const - noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && - _22 == other._22 && _23 == other._23; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - IRIS_NO_UNIQUE_ADDRESS T21 _21; - IRIS_NO_UNIQUE_ADDRESS T22 _22; - IRIS_NO_UNIQUE_ADDRESS T23 _23; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, - _23{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), - _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)) - { - } - template - constexpr explicit tuple_impl( - tuple_impl& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23) - { - } - template - constexpr explicit tuple_impl( - tuple_impl const& other) - noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23) - { - } - template - constexpr explicit tuple_impl( - tuple_impl&& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23) - { - } - template - constexpr explicit tuple_impl( - tuple_impl const&& other) - noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - return *this; - } - template - constexpr tuple_impl& - operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - return *this; - } - template - constexpr tuple_impl& - operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - _20 = alloy::get<20>(static_cast(other)); - _21 = alloy::get<21>(static_cast(other)); - _22 = alloy::get<22>(static_cast(other)); - _23 = alloy::get<23>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - swap(_21, other._21); - swap(_22, other._22); - swap(_23, other._23); - } - template - constexpr pack_indexing_t& get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - } - template - constexpr pack_indexing_t const& - get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - } - template - constexpr pack_indexing_t&& - get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - } - template - constexpr pack_indexing_t const&& - get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool - equal_to(tuple_impl const& other) const - noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && - _22 == other._22 && _23 == other._23 && _24 == other._24; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - IRIS_NO_UNIQUE_ADDRESS T21 _21; - IRIS_NO_UNIQUE_ADDRESS T22 _22; - IRIS_NO_UNIQUE_ADDRESS T23 _23; - IRIS_NO_UNIQUE_ADDRESS T24 _24; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, - _23{}, _24{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, - U24&& u24) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), - _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)) - { - } - template - constexpr explicit tuple_impl( - tuple_impl& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24) - { - } - template - constexpr explicit tuple_impl( - tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24) - { - } - template - constexpr explicit tuple_impl( - tuple_impl&& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24) - { - } - template - constexpr explicit tuple_impl( - tuple_impl const&& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - return *this; - } - template - constexpr tuple_impl& - operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - return *this; - } - template - constexpr tuple_impl& - operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - _20 = alloy::get<20>(static_cast(other)); - _21 = alloy::get<21>(static_cast(other)); - _22 = alloy::get<22>(static_cast(other)); - _23 = alloy::get<23>(static_cast(other)); - _24 = alloy::get<24>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable>) - { - static_assert( - std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - swap(_21, other._21); - swap(_22, other._22); - swap(_23, other._23); - swap(_24, other._24); - } - template - constexpr pack_indexing_t& - get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - } - template - constexpr pack_indexing_t const& - get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - } - template - constexpr pack_indexing_t&& - get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - } - template - constexpr pack_indexing_t const&& - get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to( - tuple_impl const& other) const - noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && - _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - IRIS_NO_UNIQUE_ADDRESS T21 _21; - IRIS_NO_UNIQUE_ADDRESS T22 _22; - IRIS_NO_UNIQUE_ADDRESS T23 _23; - IRIS_NO_UNIQUE_ADDRESS T24 _24; - IRIS_NO_UNIQUE_ADDRESS T25 _25; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, - _23{}, _24{}, _25{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, - U24&& u24, U25&& u25) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), - _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)) - { - } - template - constexpr explicit tuple_impl( - tuple_impl& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25) - { - } - template - constexpr explicit tuple_impl( - tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25) - { - } - template - constexpr explicit tuple_impl( - tuple_impl&& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25) - { - } - template - constexpr explicit tuple_impl( - tuple_impl const&& other) - noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - return *this; - } - template - constexpr tuple_impl& - operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - return *this; - } - template - constexpr tuple_impl& - operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - _20 = alloy::get<20>(static_cast(other)); - _21 = alloy::get<21>(static_cast(other)); - _22 = alloy::get<22>(static_cast(other)); - _23 = alloy::get<23>(static_cast(other)); - _24 = alloy::get<24>(static_cast(other)); - _25 = alloy::get<25>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - swap(_21, other._21); - swap(_22, other._22); - swap(_23, other._23); - swap(_24, other._24); - swap(_25, other._25); - } - template - constexpr pack_indexing_t& - get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - } - template - constexpr pack_indexing_t const& - get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - } - template - constexpr pack_indexing_t&& - get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - } - template - constexpr pack_indexing_t const&& - get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && - _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - IRIS_NO_UNIQUE_ADDRESS T21 _21; - IRIS_NO_UNIQUE_ADDRESS T22 _22; - IRIS_NO_UNIQUE_ADDRESS T23 _23; - IRIS_NO_UNIQUE_ADDRESS T24 _24; - IRIS_NO_UNIQUE_ADDRESS T25 _25; - IRIS_NO_UNIQUE_ADDRESS T26 _26; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, - _23{}, _24{}, _25{}, _26{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, - U24&& u24, U25&& u25, U26&& u26) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), - _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), - _26(static_cast(u26)) - { - } - template - constexpr explicit tuple_impl( - tuple_impl& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26) - { - } - template - constexpr explicit tuple_impl( - tuple_impl const& other) - noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26) - { - } - template - constexpr explicit tuple_impl( - tuple_impl&& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26) - { - } - template - constexpr explicit tuple_impl( - tuple_impl const&& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - return *this; - } - template - constexpr tuple_impl& operator=( - tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - return *this; - } - template - constexpr tuple_impl& - operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - _20 = alloy::get<20>(static_cast(other)); - _21 = alloy::get<21>(static_cast(other)); - _22 = alloy::get<22>(static_cast(other)); - _23 = alloy::get<23>(static_cast(other)); - _24 = alloy::get<24>(static_cast(other)); - _25 = alloy::get<25>(static_cast(other)); - _26 = alloy::get<26>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - swap(_21, other._21); - swap(_22, other._22); - swap(_23, other._23); - swap(_24, other._24); - swap(_25, other._25); - swap(_26, other._26); - } - template - constexpr pack_indexing_t& - get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - } - template - constexpr pack_indexing_t const& - get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - } - template - constexpr pack_indexing_t&& - get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - } - template - constexpr pack_indexing_t const&& - get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && - _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26 && _27 == other._27; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - IRIS_NO_UNIQUE_ADDRESS T21 _21; - IRIS_NO_UNIQUE_ADDRESS T22 _22; - IRIS_NO_UNIQUE_ADDRESS T23 _23; - IRIS_NO_UNIQUE_ADDRESS T24 _24; - IRIS_NO_UNIQUE_ADDRESS T25 _25; - IRIS_NO_UNIQUE_ADDRESS T26 _26; - IRIS_NO_UNIQUE_ADDRESS T27 _27; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, - _23{}, _24{}, _25{}, _26{}, _27{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, - U24&& u24, U25&& u25, U26&& u26, U27&& u27) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), - _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), - _26(static_cast(u26)), _27(static_cast(u27)) - { - } - template - constexpr explicit tuple_impl( - tuple_impl& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27) - { - } - template - constexpr explicit tuple_impl( - tuple_impl&& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), - _27(static_cast(other)._27) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), - _27(static_cast(other)._27) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - _27 = other._27; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - _27 = static_cast(other)._27; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - _27 = other._27; - return *this; - } - template - constexpr tuple_impl& operator=( - tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - _27 = static_cast(other)._27; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - _20 = alloy::get<20>(static_cast(other)); - _21 = alloy::get<21>(static_cast(other)); - _22 = alloy::get<22>(static_cast(other)); - _23 = alloy::get<23>(static_cast(other)); - _24 = alloy::get<24>(static_cast(other)); - _25 = alloy::get<25>(static_cast(other)); - _26 = alloy::get<26>(static_cast(other)); - _27 = alloy::get<27>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - swap(_21, other._21); - swap(_22, other._22); - swap(_23, other._23); - swap(_24, other._24); - swap(_25, other._25); - swap(_26, other._26); - swap(_27, other._27); - } - template - constexpr pack_indexing_t& - get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - else if constexpr (I == 27) - return _27; - } - template - constexpr pack_indexing_t const& - get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - else if constexpr (I == 27) - return _27; - } - template - constexpr pack_indexing_t&& - get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - else if constexpr (I == 27) - return static_cast(_27); - } - template - constexpr pack_indexing_t const&& - get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - else if constexpr (I == 27) - return static_cast(_27); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && - _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26 && _27 == other._27 && _28 == other._28; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - IRIS_NO_UNIQUE_ADDRESS T21 _21; - IRIS_NO_UNIQUE_ADDRESS T22 _22; - IRIS_NO_UNIQUE_ADDRESS T23 _23; - IRIS_NO_UNIQUE_ADDRESS T24 _24; - IRIS_NO_UNIQUE_ADDRESS T25 _25; - IRIS_NO_UNIQUE_ADDRESS T26 _26; - IRIS_NO_UNIQUE_ADDRESS T27 _27; - IRIS_NO_UNIQUE_ADDRESS T28 _28; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, - _23{}, _24{}, _25{}, _26{}, _27{}, _28{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, - U24&& u24, U25&& u25, U26&& u26, U27&& u27, U28&& u28) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), - _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), - _26(static_cast(u26)), _27(static_cast(u27)), _28(static_cast(u28)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), - _28(other._28) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), - _28(other._28) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), - _27(static_cast(other)._27), _28(static_cast(other)._28) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), - _27(static_cast(other)._27), _28(static_cast(other)._28) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - _27 = other._27; - _28 = other._28; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - _27 = static_cast(other)._27; - _28 = static_cast(other)._28; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - _27 = other._27; - _28 = other._28; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - _27 = static_cast(other)._27; - _28 = static_cast(other)._28; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - _20 = alloy::get<20>(static_cast(other)); - _21 = alloy::get<21>(static_cast(other)); - _22 = alloy::get<22>(static_cast(other)); - _23 = alloy::get<23>(static_cast(other)); - _24 = alloy::get<24>(static_cast(other)); - _25 = alloy::get<25>(static_cast(other)); - _26 = alloy::get<26>(static_cast(other)); - _27 = alloy::get<27>(static_cast(other)); - _28 = alloy::get<28>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - swap(_21, other._21); - swap(_22, other._22); - swap(_23, other._23); - swap(_24, other._24); - swap(_25, other._25); - swap(_26, other._26); - swap(_27, other._27); - swap(_28, other._28); - } - template - constexpr pack_indexing_t& - get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - else if constexpr (I == 27) - return _27; - else if constexpr (I == 28) - return _28; - } - template - constexpr pack_indexing_t const& - get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - else if constexpr (I == 27) - return _27; - else if constexpr (I == 28) - return _28; - } - template - constexpr pack_indexing_t&& - get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - else if constexpr (I == 27) - return static_cast(_27); - else if constexpr (I == 28) - return static_cast(_28); - } - template - constexpr pack_indexing_t const&& - get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - else if constexpr (I == 27) - return static_cast(_27); - else if constexpr (I == 28) - return static_cast(_28); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && - _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26 && _27 == other._27 && _28 == other._28 && - _29 == other._29; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - IRIS_NO_UNIQUE_ADDRESS T21 _21; - IRIS_NO_UNIQUE_ADDRESS T22 _22; - IRIS_NO_UNIQUE_ADDRESS T23 _23; - IRIS_NO_UNIQUE_ADDRESS T24 _24; - IRIS_NO_UNIQUE_ADDRESS T25 _25; - IRIS_NO_UNIQUE_ADDRESS T26 _26; - IRIS_NO_UNIQUE_ADDRESS T27 _27; - IRIS_NO_UNIQUE_ADDRESS T28 _28; - IRIS_NO_UNIQUE_ADDRESS T29 _29; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, - _23{}, _24{}, _25{}, _26{}, _27{}, _28{}, _29{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, - U24&& u24, U25&& u25, U26&& u26, U27&& u27, U28&& u28, U29&& u29) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), - _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), - _26(static_cast(u26)), _27(static_cast(u27)), _28(static_cast(u28)), _29(static_cast(u29)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), - _28(other._28), _29(other._29) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), - _28(other._28), _29(other._29) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), - _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept( - std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), - _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - _27 = other._27; - _28 = other._28; - _29 = other._29; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - _27 = static_cast(other)._27; - _28 = static_cast(other)._28; - _29 = static_cast(other)._29; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - _27 = other._27; - _28 = other._28; - _29 = other._29; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - _27 = static_cast(other)._27; - _28 = static_cast(other)._28; - _29 = static_cast(other)._29; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - _20 = alloy::get<20>(static_cast(other)); - _21 = alloy::get<21>(static_cast(other)); - _22 = alloy::get<22>(static_cast(other)); - _23 = alloy::get<23>(static_cast(other)); - _24 = alloy::get<24>(static_cast(other)); - _25 = alloy::get<25>(static_cast(other)); - _26 = alloy::get<26>(static_cast(other)); - _27 = alloy::get<27>(static_cast(other)); - _28 = alloy::get<28>(static_cast(other)); - _29 = alloy::get<29>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert( - std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - swap(_21, other._21); - swap(_22, other._22); - swap(_23, other._23); - swap(_24, other._24); - swap(_25, other._25); - swap(_26, other._26); - swap(_27, other._27); - swap(_28, other._28); - swap(_29, other._29); - } - template - constexpr pack_indexing_t& - get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - else if constexpr (I == 27) - return _27; - else if constexpr (I == 28) - return _28; - else if constexpr (I == 29) - return _29; - } - template - constexpr pack_indexing_t const& - get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - else if constexpr (I == 27) - return _27; - else if constexpr (I == 28) - return _28; - else if constexpr (I == 29) - return _29; - } - template - constexpr pack_indexing_t&& - get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - else if constexpr (I == 27) - return static_cast(_27); - else if constexpr (I == 28) - return static_cast(_28); - else if constexpr (I == 29) - return static_cast(_29); - } - template - constexpr pack_indexing_t const&& - get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - else if constexpr (I == 27) - return static_cast(_27); - else if constexpr (I == 28) - return static_cast(_28); - else if constexpr (I == 29) - return static_cast(_29); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const&, tuple const&) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && - _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26 && _27 == other._27 && _28 == other._28 && - _29 == other._29 && _30 == other._30; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - IRIS_NO_UNIQUE_ADDRESS T21 _21; - IRIS_NO_UNIQUE_ADDRESS T22 _22; - IRIS_NO_UNIQUE_ADDRESS T23 _23; - IRIS_NO_UNIQUE_ADDRESS T24 _24; - IRIS_NO_UNIQUE_ADDRESS T25 _25; - IRIS_NO_UNIQUE_ADDRESS T26 _26; - IRIS_NO_UNIQUE_ADDRESS T27 _27; - IRIS_NO_UNIQUE_ADDRESS T28 _28; - IRIS_NO_UNIQUE_ADDRESS T29 _29; - IRIS_NO_UNIQUE_ADDRESS T30 _30; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t) noexcept( - std::conjunction_v, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, - _23{}, _24{}, _25{}, _26{}, _27{}, _28{}, _29{}, _30{} - { - } - template - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, - U24&& u24, U25&& u25, U26&& u26, U27&& u27, U28&& u28, U29&& u29, U30&& u30) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), - _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), - _26(static_cast(u26)), _27(static_cast(u27)), _28(static_cast(u28)), _29(static_cast(u29)), _30(static_cast(u30)) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), - _28(other._28), _29(other._29), _30(other._30) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), - _28(other._28), _29(other._29), _30(other._30) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), - _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29), - _30(static_cast(other)._30) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), - _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29), - _30(static_cast(other)._30) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - _27 = other._27; - _28 = other._28; - _29 = other._29; - _30 = other._30; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - _27 = static_cast(other)._27; - _28 = static_cast(other)._28; - _29 = static_cast(other)._29; - _30 = static_cast(other)._30; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - _27 = other._27; - _28 = other._28; - _29 = other._29; - _30 = other._30; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - _27 = static_cast(other)._27; - _28 = static_cast(other)._28; - _29 = static_cast(other)._29; - _30 = static_cast(other)._30; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - _0 = alloy::get<0>(static_cast(other)); - _1 = alloy::get<1>(static_cast(other)); - _2 = alloy::get<2>(static_cast(other)); - _3 = alloy::get<3>(static_cast(other)); - _4 = alloy::get<4>(static_cast(other)); - _5 = alloy::get<5>(static_cast(other)); - _6 = alloy::get<6>(static_cast(other)); - _7 = alloy::get<7>(static_cast(other)); - _8 = alloy::get<8>(static_cast(other)); - _9 = alloy::get<9>(static_cast(other)); - _10 = alloy::get<10>(static_cast(other)); - _11 = alloy::get<11>(static_cast(other)); - _12 = alloy::get<12>(static_cast(other)); - _13 = alloy::get<13>(static_cast(other)); - _14 = alloy::get<14>(static_cast(other)); - _15 = alloy::get<15>(static_cast(other)); - _16 = alloy::get<16>(static_cast(other)); - _17 = alloy::get<17>(static_cast(other)); - _18 = alloy::get<18>(static_cast(other)); - _19 = alloy::get<19>(static_cast(other)); - _20 = alloy::get<20>(static_cast(other)); - _21 = alloy::get<21>(static_cast(other)); - _22 = alloy::get<22>(static_cast(other)); - _23 = alloy::get<23>(static_cast(other)); - _24 = alloy::get<24>(static_cast(other)); - _25 = alloy::get<25>(static_cast(other)); - _26 = alloy::get<26>(static_cast(other)); - _27 = alloy::get<27>(static_cast(other)); - _28 = alloy::get<28>(static_cast(other)); - _29 = alloy::get<29>(static_cast(other)); - _30 = alloy::get<30>(static_cast(other)); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - swap(_21, other._21); - swap(_22, other._22); - swap(_23, other._23); - swap(_24, other._24); - swap(_25, other._25); - swap(_26, other._26); - swap(_27, other._27); - swap(_28, other._28); - swap(_29, other._29); - swap(_30, other._30); - } - template - constexpr pack_indexing_t& - get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - else if constexpr (I == 27) - return _27; - else if constexpr (I == 28) - return _28; - else if constexpr (I == 29) - return _29; - else if constexpr (I == 30) - return _30; - } - template - constexpr pack_indexing_t const& - get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - else if constexpr (I == 27) - return _27; - else if constexpr (I == 28) - return _28; - else if constexpr (I == 29) - return _29; - else if constexpr (I == 30) - return _30; - } - template - constexpr pack_indexing_t&& - get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - else if constexpr (I == 27) - return static_cast(_27); - else if constexpr (I == 28) - return static_cast(_28); - else if constexpr (I == 29) - return static_cast(_29); - else if constexpr (I == 30) - return static_cast(_30); - } - template - constexpr pack_indexing_t const&& - get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - else if constexpr (I == 27) - return static_cast(_27); - else if constexpr (I == 28) - return static_cast(_28); - else if constexpr (I == 29) - return static_cast(_29); - else if constexpr (I == 30) - return static_cast(_30); - } -}; -template -class tuple_impl -{ - template - friend class tuple_impl; - template - requires tuple_all_elements_have_equality_operator, tuple> - friend constexpr bool alloy::operator==(tuple const& a, tuple const& b) - noexcept(detail::are_tuple_all_elements_nothrow_equality_comparable_v, tuple>); - -private: - template - constexpr void assign(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, U13&& u13, - U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, U24&& u24, U25&& u25, - U26&& u26, U27&& u27, U28&& u28, U29&& u29, U30&& u30, U31&& u31, Us&&... us) - { - _0 = static_cast(u0); - _1 = static_cast(u1); - _2 = static_cast(u2); - _3 = static_cast(u3); - _4 = static_cast(u4); - _5 = static_cast(u5); - _6 = static_cast(u6); - _7 = static_cast(u7); - _8 = static_cast(u8); - _9 = static_cast(u9); - _10 = static_cast(u10); - _11 = static_cast(u11); - _12 = static_cast(u12); - _13 = static_cast(u13); - _14 = static_cast(u14); - _15 = static_cast(u15); - _16 = static_cast(u16); - _17 = static_cast(u17); - _18 = static_cast(u18); - _19 = static_cast(u19); - _20 = static_cast(u20); - _21 = static_cast(u21); - _22 = static_cast(u22); - _23 = static_cast(u23); - _24 = static_cast(u24); - _25 = static_cast(u25); - _26 = static_cast(u26); - _27 = static_cast(u27); - _28 = static_cast(u28); - _29 = static_cast(u29); - _30 = static_cast(u30); - _31 = static_cast(u31); - rest.assign(static_cast(us)...); - } - template - constexpr bool equal_to(tuple_impl const& other) const - noexcept( - std::conjunction_v, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable, is_nothrow_equality_comparable, - is_nothrow_equality_comparable, is_nothrow_equality_comparable>) - { - return _0 == other._0 && _1 == other._1 && _2 == other._2 && _3 == other._3 && _4 == other._4 && _5 == other._5 && _6 == other._6 && _7 == other._7 && - _8 == other._8 && _9 == other._9 && _10 == other._10 && _11 == other._11 && _12 == other._12 && _13 == other._13 && _14 == other._14 && - _15 == other._15 && _16 == other._16 && _17 == other._17 && _18 == other._18 && _19 == other._19 && _20 == other._20 && _21 == other._21 && - _22 == other._22 && _23 == other._23 && _24 == other._24 && _25 == other._25 && _26 == other._26 && _27 == other._27 && _28 == other._28 && - _29 == other._29 && _30 == other._30 && _31 == other._31 && rest == other.rest; - } - -public: - IRIS_NO_UNIQUE_ADDRESS T0 _0; - IRIS_NO_UNIQUE_ADDRESS T1 _1; - IRIS_NO_UNIQUE_ADDRESS T2 _2; - IRIS_NO_UNIQUE_ADDRESS T3 _3; - IRIS_NO_UNIQUE_ADDRESS T4 _4; - IRIS_NO_UNIQUE_ADDRESS T5 _5; - IRIS_NO_UNIQUE_ADDRESS T6 _6; - IRIS_NO_UNIQUE_ADDRESS T7 _7; - IRIS_NO_UNIQUE_ADDRESS T8 _8; - IRIS_NO_UNIQUE_ADDRESS T9 _9; - IRIS_NO_UNIQUE_ADDRESS T10 _10; - IRIS_NO_UNIQUE_ADDRESS T11 _11; - IRIS_NO_UNIQUE_ADDRESS T12 _12; - IRIS_NO_UNIQUE_ADDRESS T13 _13; - IRIS_NO_UNIQUE_ADDRESS T14 _14; - IRIS_NO_UNIQUE_ADDRESS T15 _15; - IRIS_NO_UNIQUE_ADDRESS T16 _16; - IRIS_NO_UNIQUE_ADDRESS T17 _17; - IRIS_NO_UNIQUE_ADDRESS T18 _18; - IRIS_NO_UNIQUE_ADDRESS T19 _19; - IRIS_NO_UNIQUE_ADDRESS T20 _20; - IRIS_NO_UNIQUE_ADDRESS T21 _21; - IRIS_NO_UNIQUE_ADDRESS T22 _22; - IRIS_NO_UNIQUE_ADDRESS T23 _23; - IRIS_NO_UNIQUE_ADDRESS T24 _24; - IRIS_NO_UNIQUE_ADDRESS T25 _25; - IRIS_NO_UNIQUE_ADDRESS T26 _26; - IRIS_NO_UNIQUE_ADDRESS T27 _27; - IRIS_NO_UNIQUE_ADDRESS T28 _28; - IRIS_NO_UNIQUE_ADDRESS T29 _29; - IRIS_NO_UNIQUE_ADDRESS T30 _30; - IRIS_NO_UNIQUE_ADDRESS T31 _31; - IRIS_NO_UNIQUE_ADDRESS tuple_impl rest; - explicit tuple_impl() = default; - explicit tuple_impl(tuple_impl const&) = default; - explicit tuple_impl(tuple_impl&&) = default; - constexpr explicit tuple_impl(value_initialize_t vi) - noexcept(std::conjunction_v< - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, - std::is_nothrow_default_constructible, std::is_nothrow_default_constructible, std::is_nothrow_default_constructible...>) - : _0{}, _1{}, _2{}, _3{}, _4{}, _5{}, _6{}, _7{}, _8{}, _9{}, _10{}, _11{}, _12{}, _13{}, _14{}, _15{}, _16{}, _17{}, _18{}, _19{}, _20{}, _21{}, _22{}, - _23{}, _24{}, _25{}, _26{}, _27{}, _28{}, _29{}, _30{}, _31{}, rest(vi) - { - } - template - requires (sizeof...(Ts) == sizeof...(Us)) - constexpr explicit tuple_impl(U0&& u0, U1&& u1, U2&& u2, U3&& u3, U4&& u4, U5&& u5, U6&& u6, U7&& u7, U8&& u8, U9&& u9, U10&& u10, U11&& u11, U12&& u12, - U13&& u13, U14&& u14, U15&& u15, U16&& u16, U17&& u17, U18&& u18, U19&& u19, U20&& u20, U21&& u21, U22&& u22, U23&& u23, - U24&& u24, U25&& u25, U26&& u26, U27&& u27, U28&& u28, U29&& u29, U30&& u30, U31&& u31, Us&&... us) - noexcept(std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible...>) - : _0(static_cast(u0)), _1(static_cast(u1)), _2(static_cast(u2)), _3(static_cast(u3)), _4(static_cast(u4)), _5(static_cast(u5)), - _6(static_cast(u6)), _7(static_cast(u7)), _8(static_cast(u8)), _9(static_cast(u9)), _10(static_cast(u10)), - _11(static_cast(u11)), _12(static_cast(u12)), _13(static_cast(u13)), _14(static_cast(u14)), _15(static_cast(u15)), - _16(static_cast(u16)), _17(static_cast(u17)), _18(static_cast(u18)), _19(static_cast(u19)), _20(static_cast(u20)), - _21(static_cast(u21)), _22(static_cast(u22)), _23(static_cast(u23)), _24(static_cast(u24)), _25(static_cast(u25)), - _26(static_cast(u26)), _27(static_cast(u27)), _28(static_cast(u28)), _29(static_cast(u29)), _30(static_cast(u30)), - _31(static_cast(u31)), rest(static_cast(us)...) - { - } - template - constexpr explicit tuple_impl(tuple_impl& other) - noexcept( - std::conjunction_v, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible...>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), - _28(other._28), _29(other._29), _30(other._30), _31(other._31), rest(other.rest) - { - } - template - constexpr explicit tuple_impl(tuple_impl const& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible...>) - : _0(other._0), _1(other._1), _2(other._2), _3(other._3), _4(other._4), _5(other._5), _6(other._6), _7(other._7), _8(other._8), _9(other._9), - _10(other._10), _11(other._11), _12(other._12), _13(other._13), _14(other._14), _15(other._15), _16(other._16), _17(other._17), _18(other._18), - _19(other._19), _20(other._20), _21(other._21), _22(other._22), _23(other._23), _24(other._24), _25(other._25), _26(other._26), _27(other._27), - _28(other._28), _29(other._29), _30(other._30), _31(other._31), rest(other.rest) - { - } - template - constexpr explicit tuple_impl(tuple_impl&& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible...>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), - _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29), - _30(static_cast(other)._30), _31(static_cast(other)._31), rest(static_cast(other).rest) - { - } - template - constexpr explicit tuple_impl(tuple_impl const&& other) - noexcept(std::conjunction_v< - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible, - std::is_nothrow_constructible, std::is_nothrow_constructible...>) - : _0(static_cast(other)._0), _1(static_cast(other)._1), _2(static_cast(other)._2), - _3(static_cast(other)._3), _4(static_cast(other)._4), _5(static_cast(other)._5), - _6(static_cast(other)._6), _7(static_cast(other)._7), _8(static_cast(other)._8), - _9(static_cast(other)._9), _10(static_cast(other)._10), _11(static_cast(other)._11), - _12(static_cast(other)._12), _13(static_cast(other)._13), _14(static_cast(other)._14), - _15(static_cast(other)._15), _16(static_cast(other)._16), _17(static_cast(other)._17), - _18(static_cast(other)._18), _19(static_cast(other)._19), _20(static_cast(other)._20), - _21(static_cast(other)._21), _22(static_cast(other)._22), _23(static_cast(other)._23), - _24(static_cast(other)._24), _25(static_cast(other)._25), _26(static_cast(other)._26), - _27(static_cast(other)._27), _28(static_cast(other)._28), _29(static_cast(other)._29), - _30(static_cast(other)._30), _31(static_cast(other)._31), rest(static_cast(other).rest) - { - } - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept(std::conjunction_v, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, - std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable, std::is_nothrow_copy_assignable...>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - _27 = other._27; - _28 = other._28; - _29 = other._29; - _30 = other._30; - _31 = other._31; - rest = other.rest; - return *this; - } - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, - std::is_nothrow_move_assignable, std::is_nothrow_move_assignable, std::is_nothrow_move_assignable...>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - _27 = static_cast(other)._27; - _28 = static_cast(other)._28; - _29 = static_cast(other)._29; - _30 = static_cast(other)._30; - _31 = static_cast(other)._31; - rest = static_cast(other).rest; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl const& other) - noexcept( - std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable...>) - { - _0 = other._0; - _1 = other._1; - _2 = other._2; - _3 = other._3; - _4 = other._4; - _5 = other._5; - _6 = other._6; - _7 = other._7; - _8 = other._8; - _9 = other._9; - _10 = other._10; - _11 = other._11; - _12 = other._12; - _13 = other._13; - _14 = other._14; - _15 = other._15; - _16 = other._16; - _17 = other._17; - _18 = other._18; - _19 = other._19; - _20 = other._20; - _21 = other._21; - _22 = other._22; - _23 = other._23; - _24 = other._24; - _25 = other._25; - _26 = other._26; - _27 = other._27; - _28 = other._28; - _29 = other._29; - _30 = other._30; - _31 = other._31; - rest = other.rest; - return *this; - } - template - constexpr tuple_impl& operator=(tuple_impl&& other) - noexcept(std::conjunction_v, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable, - std::is_nothrow_assignable, std::is_nothrow_assignable, std::is_nothrow_assignable...>) - { - _0 = static_cast(other)._0; - _1 = static_cast(other)._1; - _2 = static_cast(other)._2; - _3 = static_cast(other)._3; - _4 = static_cast(other)._4; - _5 = static_cast(other)._5; - _6 = static_cast(other)._6; - _7 = static_cast(other)._7; - _8 = static_cast(other)._8; - _9 = static_cast(other)._9; - _10 = static_cast(other)._10; - _11 = static_cast(other)._11; - _12 = static_cast(other)._12; - _13 = static_cast(other)._13; - _14 = static_cast(other)._14; - _15 = static_cast(other)._15; - _16 = static_cast(other)._16; - _17 = static_cast(other)._17; - _18 = static_cast(other)._18; - _19 = static_cast(other)._19; - _20 = static_cast(other)._20; - _21 = static_cast(other)._21; - _22 = static_cast(other)._22; - _23 = static_cast(other)._23; - _24 = static_cast(other)._24; - _25 = static_cast(other)._25; - _26 = static_cast(other)._26; - _27 = static_cast(other)._27; - _28 = static_cast(other)._28; - _29 = static_cast(other)._29; - _30 = static_cast(other)._30; - _31 = static_cast(other)._31; - rest = static_cast(other).rest; - return *this; - } - template - constexpr tuple_impl& operator=(UTuple&& other) - { - [&, this](std::index_sequence) { assign(alloy::get(static_cast(other))...); }(std::index_sequence_for{}); - return *this; - } - constexpr void swap(tuple_impl& other) noexcept( - std::conjunction_v, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, std::is_nothrow_swappable, - std::is_nothrow_swappable...>) - { - static_assert(std::conjunction_v, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, std::is_swappable, - std::is_swappable, std::is_swappable, std::is_swappable...>); - using std::swap; - swap(_0, other._0); - swap(_1, other._1); - swap(_2, other._2); - swap(_3, other._3); - swap(_4, other._4); - swap(_5, other._5); - swap(_6, other._6); - swap(_7, other._7); - swap(_8, other._8); - swap(_9, other._9); - swap(_10, other._10); - swap(_11, other._11); - swap(_12, other._12); - swap(_13, other._13); - swap(_14, other._14); - swap(_15, other._15); - swap(_16, other._16); - swap(_17, other._17); - swap(_18, other._18); - swap(_19, other._19); - swap(_20, other._20); - swap(_21, other._21); - swap(_22, other._22); - swap(_23, other._23); - swap(_24, other._24); - swap(_25, other._25); - swap(_26, other._26); - swap(_27, other._27); - swap(_28, other._28); - swap(_29, other._29); - swap(_30, other._30); - swap(_31, other._31); - rest.swap(other.rest); - } - template - constexpr pack_indexing_t& - get() & noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - else if constexpr (I == 27) - return _27; - else if constexpr (I == 28) - return _28; - else if constexpr (I == 29) - return _29; - else if constexpr (I == 30) - return _30; - else if constexpr (I == 31) - return _31; - else - return rest.template get(); - } - template - constexpr pack_indexing_t const& - get() const& noexcept - { - if constexpr (I == 0) - return _0; - else if constexpr (I == 1) - return _1; - else if constexpr (I == 2) - return _2; - else if constexpr (I == 3) - return _3; - else if constexpr (I == 4) - return _4; - else if constexpr (I == 5) - return _5; - else if constexpr (I == 6) - return _6; - else if constexpr (I == 7) - return _7; - else if constexpr (I == 8) - return _8; - else if constexpr (I == 9) - return _9; - else if constexpr (I == 10) - return _10; - else if constexpr (I == 11) - return _11; - else if constexpr (I == 12) - return _12; - else if constexpr (I == 13) - return _13; - else if constexpr (I == 14) - return _14; - else if constexpr (I == 15) - return _15; - else if constexpr (I == 16) - return _16; - else if constexpr (I == 17) - return _17; - else if constexpr (I == 18) - return _18; - else if constexpr (I == 19) - return _19; - else if constexpr (I == 20) - return _20; - else if constexpr (I == 21) - return _21; - else if constexpr (I == 22) - return _22; - else if constexpr (I == 23) - return _23; - else if constexpr (I == 24) - return _24; - else if constexpr (I == 25) - return _25; - else if constexpr (I == 26) - return _26; - else if constexpr (I == 27) - return _27; - else if constexpr (I == 28) - return _28; - else if constexpr (I == 29) - return _29; - else if constexpr (I == 30) - return _30; - else if constexpr (I == 31) - return _31; - else - return rest.template get(); - } - template - constexpr pack_indexing_t&& - get() && noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - else if constexpr (I == 27) - return static_cast(_27); - else if constexpr (I == 28) - return static_cast(_28); - else if constexpr (I == 29) - return static_cast(_29); - else if constexpr (I == 30) - return static_cast(_30); - else if constexpr (I == 31) - return static_cast(_31); - else - return std::move(rest).template get(); - } - template - constexpr pack_indexing_t const&& - get() const&& noexcept - { - if constexpr (I == 0) - return static_cast(_0); - else if constexpr (I == 1) - return static_cast(_1); - else if constexpr (I == 2) - return static_cast(_2); - else if constexpr (I == 3) - return static_cast(_3); - else if constexpr (I == 4) - return static_cast(_4); - else if constexpr (I == 5) - return static_cast(_5); - else if constexpr (I == 6) - return static_cast(_6); - else if constexpr (I == 7) - return static_cast(_7); - else if constexpr (I == 8) - return static_cast(_8); - else if constexpr (I == 9) - return static_cast(_9); - else if constexpr (I == 10) - return static_cast(_10); - else if constexpr (I == 11) - return static_cast(_11); - else if constexpr (I == 12) - return static_cast(_12); - else if constexpr (I == 13) - return static_cast(_13); - else if constexpr (I == 14) - return static_cast(_14); - else if constexpr (I == 15) - return static_cast(_15); - else if constexpr (I == 16) - return static_cast(_16); - else if constexpr (I == 17) - return static_cast(_17); - else if constexpr (I == 18) - return static_cast(_18); - else if constexpr (I == 19) - return static_cast(_19); - else if constexpr (I == 20) - return static_cast(_20); - else if constexpr (I == 21) - return static_cast(_21); - else if constexpr (I == 22) - return static_cast(_22); - else if constexpr (I == 23) - return static_cast(_23); - else if constexpr (I == 24) - return static_cast(_24); - else if constexpr (I == 25) - return static_cast(_25); - else if constexpr (I == 26) - return static_cast(_26); - else if constexpr (I == 27) - return static_cast(_27); - else if constexpr (I == 28) - return static_cast(_28); - else if constexpr (I == 29) - return static_cast(_29); - else if constexpr (I == 30) - return static_cast(_30); - else if constexpr (I == 31) - return static_cast(_31); - else - return std::move(rest).template get(); - } -}; -} -} - -#endif diff --git a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in index 2c9e77bf4..6c6acd31d 100644 --- a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in +++ b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in @@ -9,8 +9,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#ifndef IRIS_ALLOY_GENERATE_PREPROCESSED - #include #include @@ -23,8 +21,6 @@ #include -#endif - // replace me #endif From 18333a67b8c80f7139f5a7d5794cdd414a1ed9e2 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 18:13:41 +0900 Subject: [PATCH 19/41] Refactor preprocessing --- include/iris/alloy/detail/preprocessed/tuple_impl.hpp.post.in | 2 ++ .../preprocessed/{tuple_impl.hpp.in => tuple_impl.hpp.pre.in} | 3 --- scripts/generate_tuple_members.sh | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 include/iris/alloy/detail/preprocessed/tuple_impl.hpp.post.in rename include/iris/alloy/detail/preprocessed/{tuple_impl.hpp.in => tuple_impl.hpp.pre.in} (96%) diff --git a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.post.in b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.post.in new file mode 100644 index 000000000..ddd5dae0d --- /dev/null +++ b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.post.in @@ -0,0 +1,2 @@ + +#endif diff --git a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.pre.in similarity index 96% rename from include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in rename to include/iris/alloy/detail/preprocessed/tuple_impl.hpp.pre.in index 6c6acd31d..36138c5a6 100644 --- a/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.in +++ b/include/iris/alloy/detail/preprocessed/tuple_impl.hpp.pre.in @@ -21,6 +21,3 @@ #include -// replace me - -#endif diff --git a/scripts/generate_tuple_members.sh b/scripts/generate_tuple_members.sh index 75a9b81a7..d709bf520 100755 --- a/scripts/generate_tuple_members.sh +++ b/scripts/generate_tuple_members.sh @@ -1,6 +1,6 @@ #!/usr/bin/sh g++ -Iinclude -I../preprocessor/include -Imodules/iris/include -E -P -DIRIS_ALLOY_GENERATE_PREPROCESSED include/iris/alloy/detail/tuple_impl.hpp > include/iris/alloy/detail/preprocessed/temp.hpp cd include/iris/alloy/detail/preprocessed -sed -e '/\/\/ replace me/{r temp.hpp' -e 'd}' tuple_impl.hpp.in > tuple_impl.hpp +cat tuple_impl.hpp.pre.in temp.hpp tuple_impl.hpp.post.in > tuple_impl.hpp clang-format -i tuple_impl.hpp rm temp.hpp From 37f662e17bcb331a2f2a3d7ab42a4abc47b7d2c4 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 18:18:43 +0900 Subject: [PATCH 20/41] Create batch script --- scripts/generate_tuple_members.bat | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 scripts/generate_tuple_members.bat diff --git a/scripts/generate_tuple_members.bat b/scripts/generate_tuple_members.bat new file mode 100644 index 000000000..3a3255845 --- /dev/null +++ b/scripts/generate_tuple_members.bat @@ -0,0 +1,4 @@ +cl /I:include -I:..\preprocessor\include /I:modules\iris\include /P /EP /C include\iris\alloy\detail\tuple_impl.hpp /OUT:include\iris\alloy\detail\preprocessed\temp.hpp +cd include\iris\alloy\detail\preprocessed +type tuple_impl.hpp.pre.in temp.hpp tuple_impl.hpp.post.in +del temp.hpp From fbfd699b5462a24b664f11cc89d4a1332d73664b Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 18:32:30 +0900 Subject: [PATCH 21/41] Fix --- scripts/generate_tuple_members.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate_tuple_members.bat b/scripts/generate_tuple_members.bat index 3a3255845..a222d002f 100644 --- a/scripts/generate_tuple_members.bat +++ b/scripts/generate_tuple_members.bat @@ -1,4 +1,4 @@ -cl /I:include -I:..\preprocessor\include /I:modules\iris\include /P /EP /C include\iris\alloy\detail\tuple_impl.hpp /OUT:include\iris\alloy\detail\preprocessed\temp.hpp +cl /TP /std:c++23preview /Iinclude /I..\preprocessor\include /Imodules\iris\include /P /EP /C /DIRIS_ALLOY_GENERATE_PREPROCESSED /Fiinclude\iris\alloy\detail\preprocessed\temp.hpp include\iris\alloy\detail\tuple_impl.hpp cd include\iris\alloy\detail\preprocessed -type tuple_impl.hpp.pre.in temp.hpp tuple_impl.hpp.post.in +type tuple_impl.hpp.pre.in temp.hpp tuple_impl.hpp.post.in > tuple_impl.hppp del temp.hpp From 02917d62a31815ea335aaeab15446956845ab808 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 18:34:53 +0900 Subject: [PATCH 22/41] Use pushd/popd --- scripts/generate_tuple_members.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/generate_tuple_members.bat b/scripts/generate_tuple_members.bat index a222d002f..a9949ca11 100644 --- a/scripts/generate_tuple_members.bat +++ b/scripts/generate_tuple_members.bat @@ -1,4 +1,5 @@ cl /TP /std:c++23preview /Iinclude /I..\preprocessor\include /Imodules\iris\include /P /EP /C /DIRIS_ALLOY_GENERATE_PREPROCESSED /Fiinclude\iris\alloy\detail\preprocessed\temp.hpp include\iris\alloy\detail\tuple_impl.hpp -cd include\iris\alloy\detail\preprocessed +pushd include\iris\alloy\detail\preprocessed type tuple_impl.hpp.pre.in temp.hpp tuple_impl.hpp.post.in > tuple_impl.hppp del temp.hpp +popd From 6f9f524110c68fbdc5488d4ee2e3c2e1cf5f521a Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 18:35:42 +0900 Subject: [PATCH 23/41] Set off echo --- scripts/generate_tuple_members.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/generate_tuple_members.bat b/scripts/generate_tuple_members.bat index a9949ca11..606684c4b 100644 --- a/scripts/generate_tuple_members.bat +++ b/scripts/generate_tuple_members.bat @@ -1,3 +1,4 @@ +@echo off cl /TP /std:c++23preview /Iinclude /I..\preprocessor\include /Imodules\iris\include /P /EP /C /DIRIS_ALLOY_GENERATE_PREPROCESSED /Fiinclude\iris\alloy\detail\preprocessed\temp.hpp include\iris\alloy\detail\tuple_impl.hpp pushd include\iris\alloy\detail\preprocessed type tuple_impl.hpp.pre.in temp.hpp tuple_impl.hpp.post.in > tuple_impl.hppp From 84b1bd3aec9e6b616475a82481ac36efbbd87847 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 18:37:13 +0900 Subject: [PATCH 24/41] Update CMakeLists.txt to use .bat on Windows --- CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f54ffcded..7e8bedefb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,10 +139,17 @@ set_property( DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY CMAKE_CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.sh ) -execute_process( - COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.sh - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} -) +if(MSVC) + execute_process( + COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.bat + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + ) +else() + execute_process( + COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.sh + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + ) +endif() file( GLOB_RECURSE IRIS_ALLOY_HEADERS From 1ddbde723f04fe0cccb97d03c259b93e10e7f7d1 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 18:40:35 +0900 Subject: [PATCH 25/41] Fix typo --- scripts/generate_tuple_members.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_tuple_members.bat b/scripts/generate_tuple_members.bat index 606684c4b..d7539815c 100644 --- a/scripts/generate_tuple_members.bat +++ b/scripts/generate_tuple_members.bat @@ -1,6 +1,6 @@ @echo off cl /TP /std:c++23preview /Iinclude /I..\preprocessor\include /Imodules\iris\include /P /EP /C /DIRIS_ALLOY_GENERATE_PREPROCESSED /Fiinclude\iris\alloy\detail\preprocessed\temp.hpp include\iris\alloy\detail\tuple_impl.hpp pushd include\iris\alloy\detail\preprocessed -type tuple_impl.hpp.pre.in temp.hpp tuple_impl.hpp.post.in > tuple_impl.hppp +type tuple_impl.hpp.pre.in temp.hpp tuple_impl.hpp.post.in > tuple_impl.hpp del temp.hpp popd From f5999d497f1d2fc7b835cd1168e675ee42aeed08 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 18:59:51 +0900 Subject: [PATCH 26/41] Switch execute_process to add_custom_command --- CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e8bedefb..a1a4869f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,19 +135,21 @@ set_target_properties(iris_alloy PROPERTIES CXX_EXTENSIONS OFF) # ----------------------------------------------------------------- # Configure alloy target -set_property( - DIRECTORY ${PROJECT_SOURCE_DIR} - PROPERTY CMAKE_CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.sh -) if(MSVC) - execute_process( + add_custom_command( + OUTPUT include/iris/alloy/detail/preprocessed/tuple_impl.hpp COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.bat WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + DEPENDS include/iris/alloy/detail/tuple_impl.hpp + VERBATIM ) else() - execute_process( + add_custom_command( + OUTPUT include/iris/alloy/detail/preprocessed/tuple_impl.hpp COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + DEPENDS include/iris/alloy/detail/tuple_impl.hpp + VERBATIM ) endif() From ae1c8dcad03fb7cd435c20faafedd98d920cc5d1 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 19:02:30 +0900 Subject: [PATCH 27/41] Make iris_x4 depend iris_alloy --- CMakeLists.txt | 117 +++++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 58 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a1a4869f3..0d6d144e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,64 @@ endif() add_subdirectory("${IRIS_ROOT}") +# ----------------------------------------------------------------- +# Create the alloy target + +if(MSVC) + # This needs to be `OBJECT` target to set correct `/std:` flags on IDE + add_library(iris_alloy OBJECT EXCLUDE_FROM_ALL) + set_target_properties(iris_alloy PROPERTIES LINKER_LANGUAGE CXX) + + target_link_libraries(iris_alloy PUBLIC Iris::Iris) + +else() + add_library(iris_alloy INTERFACE) + target_link_libraries(iris_alloy INTERFACE Iris::Iris) +endif() + +add_library(Iris::Alloy ALIAS iris_alloy) +set_target_properties(iris_alloy PROPERTIES CXX_EXTENSIONS OFF) + +# ----------------------------------------------------------------- +# Configure alloy target + +if(MSVC) + add_custom_command( + OUTPUT include/iris/alloy/detail/preprocessed/tuple_impl.hpp + COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.bat + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + DEPENDS include/iris/alloy/detail/tuple_impl.hpp + VERBATIM + ) +else() + add_custom_command( + OUTPUT include/iris/alloy/detail/preprocessed/tuple_impl.hpp + COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.sh + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + DEPENDS include/iris/alloy/detail/tuple_impl.hpp + VERBATIM + ) +endif() + +file( + GLOB_RECURSE IRIS_ALLOY_HEADERS + ${PROJECT_SOURCE_DIR}/include/iris/alloy/*.hpp + ${PROJECT_SOURCE_DIR}/include/iris/alloy/*.ipp +) + +list(APPEND IRIS_ALLOY_HEADERS include/iris/alloy/detail/preprocessed/tuple_impl.hpp) + +target_sources( + iris_alloy + PRIVATE FILE_SET HEADERS TYPE HEADERS FILES ${IRIS_ALLOY_HEADERS} +) +source_group( + TREE ${PROJECT_SOURCE_DIR}/include/iris PREFIX iris FILES ${IRIS_ALLOY_HEADERS} +) +target_include_directories( + iris_alloy + INTERFACE ${PROJECT_SOURCE_DIR}/include +) # ----------------------------------------------------------------- # Create the main X4 target @@ -48,7 +106,7 @@ if(MSVC) else() add_library(iris_x4 INTERFACE) - target_link_libraries(iris_x4 INTERFACE Iris::Iris) + target_link_libraries(iris_x4 INTERFACE Iris::Iris Iris::Alloy) endif() add_library(Iris::X4 ALIAS iris_x4) @@ -114,63 +172,6 @@ target_include_directories( INTERFACE ${PROJECT_SOURCE_DIR}/include ) -# ----------------------------------------------------------------- -# Create the alloy target - -if(MSVC) - # This needs to be `OBJECT` target to set correct `/std:` flags on IDE - add_library(iris_alloy OBJECT EXCLUDE_FROM_ALL) - set_target_properties(iris_alloy PROPERTIES LINKER_LANGUAGE CXX) - - target_link_libraries(iris_alloy PUBLIC Iris::Iris) - -else() - add_library(iris_alloy INTERFACE) - target_link_libraries(iris_alloy INTERFACE Iris::Iris) -endif() - -add_library(Iris::Alloy ALIAS iris_alloy) -set_target_properties(iris_alloy PROPERTIES CXX_EXTENSIONS OFF) - -# ----------------------------------------------------------------- -# Configure alloy target - -if(MSVC) - add_custom_command( - OUTPUT include/iris/alloy/detail/preprocessed/tuple_impl.hpp - COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.bat - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - DEPENDS include/iris/alloy/detail/tuple_impl.hpp - VERBATIM - ) -else() - add_custom_command( - OUTPUT include/iris/alloy/detail/preprocessed/tuple_impl.hpp - COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.sh - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - DEPENDS include/iris/alloy/detail/tuple_impl.hpp - VERBATIM - ) -endif() - -file( - GLOB_RECURSE IRIS_ALLOY_HEADERS - ${PROJECT_SOURCE_DIR}/include/iris/alloy/*.hpp - ${PROJECT_SOURCE_DIR}/include/iris/alloy/*.ipp -) - -target_sources( - iris_alloy - PRIVATE FILE_SET HEADERS TYPE HEADERS FILES ${IRIS_ALLOY_HEADERS} -) -source_group( - TREE ${PROJECT_SOURCE_DIR}/include/iris PREFIX iris FILES ${IRIS_ALLOY_HEADERS} -) -target_include_directories( - iris_alloy - INTERFACE ${PROJECT_SOURCE_DIR}/include -) - # ----------------------------------------------------------------- # Test From c4cb346515cfc86d643ec99eeb68b89c91ecf2a0 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 20:54:22 +0900 Subject: [PATCH 28/41] Use absolute path --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d6d144e3..c3e8e4167 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,18 +51,18 @@ set_target_properties(iris_alloy PROPERTIES CXX_EXTENSIONS OFF) if(MSVC) add_custom_command( - OUTPUT include/iris/alloy/detail/preprocessed/tuple_impl.hpp + OUTPUT ${PROJECT_SOURCE_DIR}/include/iris/alloy/detail/preprocessed/tuple_impl.hpp COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.bat WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - DEPENDS include/iris/alloy/detail/tuple_impl.hpp + DEPENDS ${PROJECT_SOURCE_DIR}/include/iris/alloy/detail/tuple_impl.hpp VERBATIM ) else() add_custom_command( - OUTPUT include/iris/alloy/detail/preprocessed/tuple_impl.hpp + OUTPUT ${PROJECT_SOURCE_DIR}/include/iris/alloy/detail/preprocessed/tuple_impl.hpp COMMAND ${PROJECT_SOURCE_DIR}/scripts/generate_tuple_members.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - DEPENDS include/iris/alloy/detail/tuple_impl.hpp + DEPENDS ${PROJECT_SOURCE_DIR}/include/iris/alloy/detail/tuple_impl.hpp VERBATIM ) endif() @@ -73,7 +73,7 @@ file( ${PROJECT_SOURCE_DIR}/include/iris/alloy/*.ipp ) -list(APPEND IRIS_ALLOY_HEADERS include/iris/alloy/detail/preprocessed/tuple_impl.hpp) +list(APPEND IRIS_ALLOY_HEADERS ${PROJECT_SOURCE_DIR}/include/iris/alloy/detail/preprocessed/tuple_impl.hpp) target_sources( iris_alloy From dbd79decebcebb398c0750cb793625235dbde98f Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 20:59:10 +0900 Subject: [PATCH 29/41] Test both by default --- test/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5fe7e9d68..8e984fbc4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,9 +5,11 @@ # https://www.boost.org/LICENSE_1_0.txt if(PROJECT_IS_TOP_LEVEL) + option(IRIS_TEST_ALLOY "test alloy" ON) if(IRIS_TEST_ALLOY) add_subdirectory(alloy) endif() + option(IRIS_TEST_X4 "test x4" ON) if(IRIS_TEST_X4) add_subdirectory(x4) endif() From b3d6a8c6caa641b6c8ceaec244435ccdc170d6b3 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 9 Feb 2026 21:03:49 +0900 Subject: [PATCH 30/41] Fix CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94ec09d1e..27f38b85c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -278,7 +278,7 @@ jobs: -DCMAKE_CXX_FLAGS="${{ matrix.compiler.cxxflags }}" \ -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version.number }} \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type.name }} \ - -DIRIS_TEST_ALLOY=${{ case(matrix.components == 'alloy', 'ON', 'OFF') }} \ + -DIRIS_TEST_ALLOY=${{ case(matrix.components == 'alloy' || matrix.components == 'x4', 'ON', 'OFF') }} \ -DIRIS_TEST_X4=${{ case(matrix.components == 'x4', 'ON', 'OFF') }} \ -S . From 8ab6b017fdaaeb2d501ea147a0f17f848c4eaf33 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Tue, 10 Feb 2026 14:48:29 +0900 Subject: [PATCH 31/41] Add natvis --- iris_x4.natvis | 76 ++++++++++++++++++++++++++++++++++++++ scripts/generate_natvis.py | 27 ++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 iris_x4.natvis create mode 100644 scripts/generate_natvis.py diff --git a/iris_x4.natvis b/iris_x4.natvis new file mode 100644 index 000000000..17ca19417 --- /dev/null +++ b/iris_x4.natvis @@ -0,0 +1,76 @@ + + + + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}, {_21}, {_22}, {_23}, {_24}, {_25}, {_26}, {_27}, {_28}, {_29}, {_30}, {_31}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}, {_21}, {_22}, {_23}, {_24}, {_25}, {_26}, {_27}, {_28}, {_29}, {_30}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}, {_21}, {_22}, {_23}, {_24}, {_25}, {_26}, {_27}, {_28}, {_29}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}, {_21}, {_22}, {_23}, {_24}, {_25}, {_26}, {_27}, {_28}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}, {_21}, {_22}, {_23}, {_24}, {_25}, {_26}, {_27}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}, {_21}, {_22}, {_23}, {_24}, {_25}, {_26}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}, {_21}, {_22}, {_23}, {_24}, {_25}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}, {_21}, {_22}, {_23}, {_24}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}, {_21}, {_22}, {_23}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}, {_21}, {_22}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}, {_21}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}, {_20}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}, {_19}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}, {_18}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}, {_17}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}, {_16}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}, {_15}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}, {_14}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}, {_13}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}, {_12}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}, {_11}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}, {_10}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}, {_9}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}, {_8}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}, {_7}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}, {_6}) + ({_0}, {_1}, {_2}, {_3}, {_4}, {_5}) + ({_0}, {_1}, {_2}, {_3}, {_4}) + ({_0}, {_1}, {_2}, {_3}) + ({_0}, {_1}, {_2}) + ({_0}, {_1}) + ({_0}) + + + _0 + _1 + _2 + _3 + _4 + _5 + _6 + _7 + _8 + _9 + _10 + _11 + _12 + _13 + _14 + _15 + _16 + _17 + _18 + _19 + _20 + _21 + _22 + _23 + _24 + _25 + _26 + _27 + _28 + _29 + _30 + _31 + + + diff --git a/scripts/generate_natvis.py b/scripts/generate_natvis.py new file mode 100644 index 000000000..a2641b5ab --- /dev/null +++ b/scripts/generate_natvis.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python3 +N = 32 + +print('') +print('') +print(' ') + +# DisplayString: 32 -> 1 +for k in range(N, 0, -1): + elems = ", ".join(f"{{_{i}}}" for i in range(k)) + print(f' ({elems})') + +print() +print(' ') + +# Expand: 0 -> 31 +for i in range(N): + print(f' _{i}') + +print(' ') +print(' ') +print('') From 6ec9cdebdc6d6e2da4a3b44d0547449cd03d98bd Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Tue, 10 Feb 2026 14:54:51 +0900 Subject: [PATCH 32/41] Register nativs with target_sources --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3e8e4167..413d50126 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,7 +99,7 @@ if(MSVC) iris_x4 PRIVATE # "${PROJECT_SOURCE_DIR}/cpp.hint" # TODO - # "${PROJECT_SOURCE_DIR}/iris_x4.natvis" # TODO + "${PROJECT_SOURCE_DIR}/iris_x4.natvis" ) target_link_libraries(iris_x4 PUBLIC Iris::Iris) From 3a697e4e35abfa7f23c3749e481f20976c5da45a Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Tue, 10 Feb 2026 21:51:25 +0900 Subject: [PATCH 33/41] Revert back comment --- include/iris/x4/core/attribute.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/iris/x4/core/attribute.hpp b/include/iris/x4/core/attribute.hpp index 6276a05ba..5cf5e12d0 100644 --- a/include/iris/x4/core/attribute.hpp +++ b/include/iris/x4/core/attribute.hpp @@ -37,6 +37,9 @@ concept X4NonUnusedAttribute = std::is_object_v && // implies not reference !std::is_base_of_v> && std::move_constructible>; + // TODO: `fusion::iterator_range` does not satisfy these due to `fusion::vector`'s iterator being a reference type + //std::default_initializable> && + //std::assignable_from&, std::remove_const_t>; template concept X4Attribute = X4UnusedAttribute || X4NonUnusedAttribute; From 033549409b52f94917eb27f45cab433757851e68 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Tue, 10 Feb 2026 21:54:00 +0900 Subject: [PATCH 34/41] Add license header --- scripts/generate_natvis.py | 5 +++++ scripts/generate_tuple_members.bat | 5 +++++ scripts/generate_tuple_members.sh | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/scripts/generate_natvis.py b/scripts/generate_natvis.py index a2641b5ab..29f479234 100644 --- a/scripts/generate_natvis.py +++ b/scripts/generate_natvis.py @@ -1,4 +1,9 @@ #!/usr/bin/env python3 +# Copyright 2026 The Iris Project Contributors +# +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt + N = 32 print('') diff --git a/scripts/generate_tuple_members.bat b/scripts/generate_tuple_members.bat index d7539815c..fdff9b76c 100644 --- a/scripts/generate_tuple_members.bat +++ b/scripts/generate_tuple_members.bat @@ -1,6 +1,11 @@ +" Copyright 2026 The Iris Project Contributors +" +" Distributed under the Boost Software License, Version 1.0. +" https://www.boost.org/LICENSE_1_0.txt @echo off cl /TP /std:c++23preview /Iinclude /I..\preprocessor\include /Imodules\iris\include /P /EP /C /DIRIS_ALLOY_GENERATE_PREPROCESSED /Fiinclude\iris\alloy\detail\preprocessed\temp.hpp include\iris\alloy\detail\tuple_impl.hpp pushd include\iris\alloy\detail\preprocessed type tuple_impl.hpp.pre.in temp.hpp tuple_impl.hpp.post.in > tuple_impl.hpp +clang-format -i tuple_impl.hpp del temp.hpp popd diff --git a/scripts/generate_tuple_members.sh b/scripts/generate_tuple_members.sh index d709bf520..4bf8bc68f 100755 --- a/scripts/generate_tuple_members.sh +++ b/scripts/generate_tuple_members.sh @@ -1,4 +1,8 @@ #!/usr/bin/sh +# Copyright 2026 The Iris Project Contributors +# +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt g++ -Iinclude -I../preprocessor/include -Imodules/iris/include -E -P -DIRIS_ALLOY_GENERATE_PREPROCESSED include/iris/alloy/detail/tuple_impl.hpp > include/iris/alloy/detail/preprocessed/temp.hpp cd include/iris/alloy/detail/preprocessed cat tuple_impl.hpp.pre.in temp.hpp tuple_impl.hpp.post.in > tuple_impl.hpp From 74b6fef6e3207f0455c2446a5da860d1de9dc918 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Tue, 10 Feb 2026 21:54:42 +0900 Subject: [PATCH 35/41] Use Iris's boolean_testable --- include/iris/alloy/detail/tuple_comparison.hpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/include/iris/alloy/detail/tuple_comparison.hpp b/include/iris/alloy/detail/tuple_comparison.hpp index 057a8c0aa..d6d561cdd 100644 --- a/include/iris/alloy/detail/tuple_comparison.hpp +++ b/include/iris/alloy/detail/tuple_comparison.hpp @@ -9,6 +9,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ +#include + #include #include @@ -19,21 +21,13 @@ class tuple; namespace detail { -template -concept boolean_testable_impl = std::convertible_to; - -template -concept boolean_testable = boolean_testable_impl && requires(T&& x) { - { !static_cast(x) } -> boolean_testable_impl; -}; - namespace equality_operator_poison_barrier { bool operator==(auto, auto) = delete; // poison-pill template concept has_equality_operator = requires(T&& x, U&& y) { - { static_cast(x) == static_cast(y) } -> boolean_testable; + { static_cast(x) == static_cast(y) } -> req::boolean_testable; }; template From a64aa287e70e741b7db8b2146c5e139f194b222f Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Tue, 10 Feb 2026 21:58:37 +0900 Subject: [PATCH 36/41] Add license header --- iris_x4.natvis | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iris_x4.natvis b/iris_x4.natvis index 17ca19417..5f8063c4a 100644 --- a/iris_x4.natvis +++ b/iris_x4.natvis @@ -1,4 +1,10 @@ + Date: Tue, 10 Feb 2026 22:12:54 +0900 Subject: [PATCH 37/41] Attempt to reduce warnings --- test/alloy/alloy.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/alloy/alloy.cpp b/test/alloy/alloy.cpp index f77af11f7..815a9fd2a 100644 --- a/test/alloy/alloy.cpp +++ b/test/alloy/alloy.cpp @@ -304,9 +304,9 @@ TEST_CASE("tuple") STATIC_CHECK(!std::is_nothrow_constructible_v, alloy::tuple&&>); STATIC_CHECK(!std::is_nothrow_constructible_v, alloy::tuple const&&>); - alloy::tuple a(42, 3.14f); - alloy::tuple b(a); - CHECK(alloy::get<0>(b) == float{42}); + alloy::tuple a(42, 3.14f); + alloy::tuple b(a); + CHECK(alloy::get<0>(b) == double{42}); CHECK(alloy::get<1>(b) == 3); } @@ -342,13 +342,13 @@ TEST_CASE("tuple") } { - STATIC_CHECK(std::is_assignable_v&, alloy::tuple const&>); - STATIC_CHECK(std::is_assignable_v&, alloy::tuple&&>); - STATIC_CHECK(std::is_nothrow_assignable_v&, alloy::tuple const&>); - STATIC_CHECK(std::is_nothrow_assignable_v&, alloy::tuple&&>); + STATIC_CHECK(std::is_assignable_v&, alloy::tuple const&>); + STATIC_CHECK(std::is_assignable_v&, alloy::tuple&&>); + STATIC_CHECK(std::is_nothrow_assignable_v&, alloy::tuple const&>); + STATIC_CHECK(std::is_nothrow_assignable_v&, alloy::tuple&&>); alloy::tuple a(33); - alloy::tuple b(4.f); + alloy::tuple b(4.f); a = b; a = std::move(b); CHECK(alloy::get<0>(a) == 4); From 89d587854c485d1508b536f6aab1d1b01e971a81 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Tue, 10 Feb 2026 22:30:31 +0900 Subject: [PATCH 38/41] Fix batch file --- scripts/generate_tuple_members.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/generate_tuple_members.bat b/scripts/generate_tuple_members.bat index fdff9b76c..38b74cb0f 100644 --- a/scripts/generate_tuple_members.bat +++ b/scripts/generate_tuple_members.bat @@ -1,7 +1,7 @@ -" Copyright 2026 The Iris Project Contributors -" -" Distributed under the Boost Software License, Version 1.0. -" https://www.boost.org/LICENSE_1_0.txt +REM Copyright 2026 The Iris Project Contributors +REM +REM Distributed under the Boost Software License, Version 1.0. +REM https://www.boost.org/LICENSE_1_0.txt @echo off cl /TP /std:c++23preview /Iinclude /I..\preprocessor\include /Imodules\iris\include /P /EP /C /DIRIS_ALLOY_GENERATE_PREPROCESSED /Fiinclude\iris\alloy\detail\preprocessed\temp.hpp include\iris\alloy\detail\tuple_impl.hpp pushd include\iris\alloy\detail\preprocessed From 8751853ff213a6511b3f7d46876b33f332c14a0c Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Tue, 10 Feb 2026 22:36:26 +0900 Subject: [PATCH 39/41] Fix potential bug and suppress warnings --- include/iris/alloy/tuple.hpp | 8 ++++---- test/alloy/alloy.cpp | 13 ++++++------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/iris/alloy/tuple.hpp b/include/iris/alloy/tuple.hpp index 82c0241d6..bf6de922d 100644 --- a/include/iris/alloy/tuple.hpp +++ b/include/iris/alloy/tuple.hpp @@ -139,7 +139,7 @@ class tuple : public detail::tuple_impl #endif constexpr explicit(!detail::tuple_traits&, Ts...>::all_convertible) tuple(tuple& other) noexcept(detail::tuple_traits&, Ts...>::all_nothrow_constructible) - : base_type(other) + : base_type(static_cast&>(other)) {} template @@ -154,7 +154,7 @@ class tuple : public detail::tuple_impl #endif constexpr explicit(!detail::tuple_traits const&, Ts...>::all_convertible) tuple(tuple const& other) noexcept(detail::tuple_traits const&, Ts...>::all_nothrow_constructible) - : base_type(other) + : base_type(static_cast const&>(other)) {} template @@ -169,7 +169,7 @@ class tuple : public detail::tuple_impl #endif constexpr explicit(!detail::tuple_traits&&, Ts...>::all_convertible) tuple(tuple&& other) noexcept(detail::tuple_traits&&, Ts...>::all_nothrow_constructible) - : base_type(static_cast&&>(other)) + : base_type(static_cast&&>(other)) {} template @@ -184,7 +184,7 @@ class tuple : public detail::tuple_impl #endif constexpr explicit(!detail::tuple_traits const&&, Ts...>::all_convertible) tuple(tuple const&& other) noexcept(detail::tuple_traits const&&, Ts...>::all_nothrow_constructible) - : base_type(static_cast const&&>(other)) + : base_type(static_cast const&&>(other)) {} template diff --git a/test/alloy/alloy.cpp b/test/alloy/alloy.cpp index 815a9fd2a..ddb9cc126 100644 --- a/test/alloy/alloy.cpp +++ b/test/alloy/alloy.cpp @@ -304,10 +304,9 @@ TEST_CASE("tuple") STATIC_CHECK(!std::is_nothrow_constructible_v, alloy::tuple&&>); STATIC_CHECK(!std::is_nothrow_constructible_v, alloy::tuple const&&>); - alloy::tuple a(42, 3.14f); - alloy::tuple b(a); - CHECK(alloy::get<0>(b) == double{42}); - CHECK(alloy::get<1>(b) == 3); + alloy::tuple a(42); + alloy::tuple b(a); + CHECK(alloy::get<0>(b) == 42L); } { @@ -347,11 +346,11 @@ TEST_CASE("tuple") STATIC_CHECK(std::is_nothrow_assignable_v&, alloy::tuple const&>); STATIC_CHECK(std::is_nothrow_assignable_v&, alloy::tuple&&>); - alloy::tuple a(33); - alloy::tuple b(4.f); + alloy::tuple a(33L); + alloy::tuple b(4); a = b; a = std::move(b); - CHECK(alloy::get<0>(a) == 4); + CHECK(alloy::get<0>(a) == 4L); } { From 94722febb77de16d5e9c1ba66e566005b3201d93 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Tue, 10 Feb 2026 22:40:42 +0900 Subject: [PATCH 40/41] Fix potential bug part 2 --- include/iris/alloy/tuple.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/iris/alloy/tuple.hpp b/include/iris/alloy/tuple.hpp index bf6de922d..824825fa5 100644 --- a/include/iris/alloy/tuple.hpp +++ b/include/iris/alloy/tuple.hpp @@ -298,7 +298,7 @@ class tuple : public detail::tuple_impl constexpr tuple& operator=(tuple const& other) noexcept(detail::tuple_traits const&, Ts...>::all_nothrow_assignable) { - base_type::operator=(other); + base_type::operator=(static_cast const&>(other)); return *this; } @@ -310,7 +310,7 @@ class tuple : public detail::tuple_impl constexpr tuple& operator=(tuple&& other) noexcept(detail::tuple_traits&&, Ts...>::all_nothrow_assignable) { - base_type::operator=(other); + base_type::operator=(static_cast &&>(other)); return *this; } From 5cacfe53e587f4b163615fed1f7c3ff918583b22 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Tue, 10 Feb 2026 22:52:26 +0900 Subject: [PATCH 41/41] Abbreviate iris::alloy usage --- test/alloy/alloy.cpp | 1 - test/x4/alternative.cpp | 24 +++++----- test/x4/attribute_type_check.cpp | 10 ++--- test/x4/debug.cpp | 2 +- test/x4/expect.cpp | 24 +++++----- test/x4/int.cpp | 4 +- test/x4/iris_x4_test.hpp | 1 + test/x4/lit.cpp | 4 +- test/x4/omit.cpp | 14 +++--- test/x4/optional.cpp | 14 +++--- test/x4/plus.cpp | 4 +- test/x4/rule3.cpp | 2 +- test/x4/rule4.cpp | 6 +-- test/x4/sequence.cpp | 76 ++++++++++++++++---------------- test/x4/symbols3.cpp | 2 +- 15 files changed, 94 insertions(+), 94 deletions(-) diff --git a/test/alloy/alloy.cpp b/test/alloy/alloy.cpp index ddb9cc126..9d6e9bc9e 100644 --- a/test/alloy/alloy.cpp +++ b/test/alloy/alloy.cpp @@ -15,7 +15,6 @@ #include #include - namespace alloy = iris::alloy; struct NonAdaptedStruct diff --git a/test/x4/alternative.cpp b/test/x4/alternative.cpp index 433ac1d10..bb0db2d74 100644 --- a/test/x4/alternative.cpp +++ b/test/x4/alternative.cpp @@ -43,12 +43,12 @@ struct di_include }; template<> -struct iris::alloy::adaptor { +struct alloy::adaptor { using getters_list = make_getters_list<&di_ignore::text>; }; template<> -struct iris::alloy::adaptor { +struct alloy::adaptor { using getters_list = make_getters_list<&di_include::FileName>; }; @@ -131,10 +131,10 @@ TEST_CASE("alternative") // test if alternatives with all components having unused // attributes have an unused attribute - iris::alloy::tuple v; + alloy::tuple v; REQUIRE((parse("abc", char_ >> (omit[char_] | omit[char_]) >> char_, v))); - CHECK((iris::alloy::get<0>(v) == 'a')); - CHECK((iris::alloy::get<1>(v) == 'c')); + CHECK((alloy::get<0>(v) == 'a')); + CHECK((alloy::get<1>(v) == 'c')); } { @@ -222,14 +222,14 @@ TEST_CASE("alternative") // single-element tuple tests { - iris::alloy::tuple> fv; + alloy::tuple> fv; REQUIRE(parse("12345", int_ | +char_, fv)); - CHECK(iris::get(iris::alloy::get<0>(fv)) == 12345); + CHECK(iris::get(alloy::get<0>(fv)) == 12345); } { - iris::alloy::tuple> fvi; + alloy::tuple> fvi; REQUIRE(parse("12345", int_ | int_, fvi)); - CHECK(iris::get(iris::alloy::get<0>(fvi)) == 12345); + CHECK(iris::get(alloy::get<0>(fvi)) == 12345); } // alternative over single element tuple as part of another tuple @@ -239,11 +239,11 @@ TEST_CASE("alternative") constexpr auto keys = key1 | key2; constexpr auto pair = keys >> lit("=") >> +char_; - iris::alloy::tuple, std::string> attr_; + alloy::tuple, std::string> attr_; REQUIRE(parse("long=ABC", pair, attr_)); - CHECK(iris::get_if(&iris::alloy::get<0>(attr_)) != nullptr); - CHECK(iris::get_if(&iris::alloy::get<0>(attr_)) == nullptr); + CHECK(iris::get_if(&alloy::get<0>(attr_)) != nullptr); + CHECK(iris::get_if(&alloy::get<0>(attr_)) == nullptr); } { diff --git a/test/x4/attribute_type_check.cpp b/test/x4/attribute_type_check.cpp index 198b6e75f..d70d218e6 100644 --- a/test/x4/attribute_type_check.cpp +++ b/test/x4/attribute_type_check.cpp @@ -97,7 +97,7 @@ void gen_tests(Values const&... values) { gen_single_item_tests(values...); - iris::alloy::tuple attribute(values...); + alloy::tuple attribute(values...); gen_sequence_tests(attribute, values...); } @@ -109,13 +109,13 @@ void make_test(Attributes const&... attrs) gen_tests(attrs...); gen_tests< std::optional..., - iris::alloy::tuple... + alloy::tuple... >(attrs..., attrs...); gen_tests< - std::optional>..., - iris::alloy::tuple>... - >(iris::alloy::tuple(attrs)..., attrs...); + std::optional>..., + alloy::tuple>... + >(alloy::tuple(attrs)..., attrs...); } } // anonymous diff --git a/test/x4/debug.cpp b/test/x4/debug.cpp index 5d835c645..32104d81d 100644 --- a/test/x4/debug.cpp +++ b/test/x4/debug.cpp @@ -120,7 +120,7 @@ TEST_CASE("debug") { // std::container attributes - using tpl = iris::alloy::tuple; + using tpl = alloy::tuple; rule> start("start"); auto start_def = start = *(int_ >> alpha); diff --git a/test/x4/expect.cpp b/test/x4/expect.cpp index 648d84fc5..553839718 100644 --- a/test/x4/expect.cpp +++ b/test/x4/expect.cpp @@ -365,27 +365,27 @@ TEST_CASE("expect") // Test that attributes with > (sequences) work just like >> (sequences) { - iris::alloy::tuple attr; + alloy::tuple attr; TEST_ATTR_SUCCESS_PASS(" a\n b\n c", char_ > char_ > char_, space, attr); - CHECK((iris::alloy::get<0>(attr) == 'a')); - CHECK((iris::alloy::get<1>(attr) == 'b')); - CHECK((iris::alloy::get<2>(attr) == 'c')); + CHECK((alloy::get<0>(attr) == 'a')); + CHECK((alloy::get<1>(attr) == 'b')); + CHECK((alloy::get<2>(attr) == 'c')); } { - iris::alloy::tuple attr; + alloy::tuple attr; TEST_ATTR_SUCCESS_PASS(" a\n b\n c", char_ > char_ >> char_, space, attr); - CHECK((iris::alloy::get<0>(attr) == 'a')); - CHECK((iris::alloy::get<1>(attr) == 'b')); - CHECK((iris::alloy::get<2>(attr) == 'c')); + CHECK((alloy::get<0>(attr) == 'a')); + CHECK((alloy::get<1>(attr) == 'b')); + CHECK((alloy::get<2>(attr) == 'c')); } { - iris::alloy::tuple attr; + alloy::tuple attr; TEST_ATTR_SUCCESS_PASS(" a, b, c", char_ >> ',' > char_ >> ',' > char_, space, attr); - CHECK((iris::alloy::get<0>(attr) == 'a')); - CHECK((iris::alloy::get<1>(attr) == 'b')); - CHECK((iris::alloy::get<2>(attr) == 'c')); + CHECK((alloy::get<0>(attr) == 'a')); + CHECK((alloy::get<1>(attr) == 'b')); + CHECK((alloy::get<2>(attr) == 'c')); } { diff --git a/test/x4/int.cpp b/test/x4/int.cpp index 9f92817ff..7a1cc7394 100644 --- a/test/x4/int.cpp +++ b/test/x4/int.cpp @@ -233,9 +233,9 @@ TEST_CASE("int") // single-element tuple tests { - iris::alloy::tuple i{}; + alloy::tuple i{}; REQUIRE(parse("-123456", int_, i)); - CHECK(iris::alloy::get<0>(i) == -123456); + CHECK(alloy::get<0>(i) == -123456); } } diff --git a/test/x4/iris_x4_test.hpp b/test/x4/iris_x4_test.hpp index 34e42c737..45d6dbd4b 100644 --- a/test/x4/iris_x4_test.hpp +++ b/test/x4/iris_x4_test.hpp @@ -23,6 +23,7 @@ #include #include +namespace alloy = iris::alloy; namespace x4 = iris::x4; using x4::unused_type; diff --git a/test/x4/lit.cpp b/test/x4/lit.cpp index 0bd8026bb..ba370320a 100644 --- a/test/x4/lit.cpp +++ b/test/x4/lit.cpp @@ -148,8 +148,8 @@ TEST_CASE("lit") { // single-element tuple tests - iris::alloy::tuple s; + alloy::tuple s; REQUIRE(parse("kimpo", x4::standard::string("kimpo"), s)); - CHECK(iris::alloy::get<0>(s) == "kimpo"); + CHECK(alloy::get<0>(s) == "kimpo"); } } diff --git a/test/x4/omit.cpp b/test/x4/omit.cpp index 538c33ba4..bc24f4a18 100644 --- a/test/x4/omit.cpp +++ b/test/x4/omit.cpp @@ -65,7 +65,7 @@ TEST_CASE("omit") { // omit[] means we don't receive the attribute - iris::alloy::tuple<> attr; + alloy::tuple<> attr; CHECK(parse("abc", omit[char_] >> omit['b'] >> omit[char_], attr)); } @@ -81,18 +81,18 @@ TEST_CASE("omit") // omit[] means we don't receive the attribute, if all elements of a // sequence have unused attributes, the whole sequence has an unused // attribute as well - iris::alloy::tuple attr; + alloy::tuple attr; REQUIRE(parse("abcde", char_ >> (omit[char_] >> omit['c'] >> omit[char_]) >> char_, attr)); - CHECK(iris::alloy::get<0>(attr) == 'a'); - CHECK(iris::alloy::get<1>(attr) == 'e'); + CHECK(alloy::get<0>(attr) == 'a'); + CHECK(alloy::get<1>(attr) == 'e'); } { // "hello" has an unused_type. unused attrubutes are not part of the sequence - iris::alloy::tuple attr; + alloy::tuple attr; REQUIRE(parse("a hello c", char_ >> "hello" >> char_, space, attr)); - CHECK(iris::alloy::get<0>(attr) == 'a'); - CHECK(iris::alloy::get<1>(attr) == 'c'); + CHECK(alloy::get<0>(attr) == 'a'); + CHECK(alloy::get<1>(attr) == 'c'); } { diff --git a/test/x4/optional.cpp b/test/x4/optional.cpp index 20db6000d..d45152329 100644 --- a/test/x4/optional.cpp +++ b/test/x4/optional.cpp @@ -37,7 +37,7 @@ struct adata }; template<> -struct iris::alloy::adaptor { +struct alloy::adaptor { using getters_list = make_getters_list<&adata::a, &adata::b>; }; @@ -105,10 +105,10 @@ TEST_CASE("optional") static_assert(!x4::parser_traits>::has_attribute); static_assert(std::same_as>::attribute_type, unused_type>); - iris::alloy::tuple v; + alloy::tuple v; REQUIRE(parse("a1234c", char_ >> -omit[int_] >> char_, v)); - CHECK(iris::alloy::get<0>(v) == 'a'); - CHECK(iris::alloy::get<1>(v) == 'c'); + CHECK(alloy::get<0>(v) == 'a'); + CHECK(alloy::get<1>(v) == 'c'); } // optional of `unused_container_type` { @@ -132,10 +132,10 @@ TEST_CASE("optional") } } { - iris::alloy::tuple v; + alloy::tuple v; REQUIRE(parse("a1234c", char_ >> omit[-int_] >> char_, v)); - CHECK(iris::alloy::get<0>(v) == 'a'); - CHECK(iris::alloy::get<1>(v) == 'c'); + CHECK(alloy::get<0>(v) == 'a'); + CHECK(alloy::get<1>(v) == 'c'); } { diff --git a/test/x4/plus.cpp b/test/x4/plus.cpp index b4703f2d4..d51da684e 100644 --- a/test/x4/plus.cpp +++ b/test/x4/plus.cpp @@ -135,9 +135,9 @@ TEST_CASE("plus") // single-element tuple tests { - iris::alloy::tuple fs; + alloy::tuple fs; REQUIRE(parse("12345", +char_, fs)); - CHECK(iris::alloy::get<0>(fs) == "12345"); + CHECK(alloy::get<0>(fs) == "12345"); } { diff --git a/test/x4/rule3.cpp b/test/x4/rule3.cpp index 74bc185f7..7ad893611 100644 --- a/test/x4/rule3.cpp +++ b/test/x4/rule3.cpp @@ -86,7 +86,7 @@ struct recursive_tuple }; template<> -struct iris::alloy::adaptor { +struct alloy::adaptor { using getters_list = make_getters_list<&recursive_tuple::value, &recursive_tuple::children>; }; diff --git a/test/x4/rule4.cpp b/test/x4/rule4.cpp index 7a42b46ed..cf1c4a21f 100644 --- a/test/x4/rule4.cpp +++ b/test/x4/rule4.cpp @@ -170,11 +170,11 @@ TEST_CASE("rule4") // test handling of single element tuple { - auto r = rule>{} = int_; + auto r = rule>{} = int_; - iris::alloy::tuple v(0); + alloy::tuple v(0); REQUIRE(parse("1", r, v)); - CHECK(iris::alloy::get<0>(v) == 1); + CHECK(alloy::get<0>(v) == 1); } // attribute compatibility test diff --git a/test/x4/sequence.cpp b/test/x4/sequence.cpp index a372a4e48..fc3628a70 100644 --- a/test/x4/sequence.cpp +++ b/test/x4/sequence.cpp @@ -69,42 +69,42 @@ TEST_CASE("sequence") CHECK(parse(" Hello, World", lit("Hello") >> ',' >> "World", space)); { - iris::alloy::tuple vec; + alloy::tuple vec; REQUIRE(parse("ab", char_ >> char_, vec)); - CHECK(iris::alloy::get<0>(vec) == 'a'); - CHECK(iris::alloy::get<1>(vec) == 'b'); + CHECK(alloy::get<0>(vec) == 'a'); + CHECK(alloy::get<1>(vec) == 'b'); } { - iris::alloy::tuple vec; + alloy::tuple vec; REQUIRE(parse(" a\n b\n c", char_ >> char_ >> char_, space, vec)); - CHECK(iris::alloy::get<0>(vec) == 'a'); - CHECK(iris::alloy::get<1>(vec) == 'b'); - CHECK(iris::alloy::get<2>(vec) == 'c'); + CHECK(alloy::get<0>(vec) == 'a'); + CHECK(alloy::get<1>(vec) == 'b'); + CHECK(alloy::get<2>(vec) == 'c'); } { // 'b' has an unused_type. unused attributes are not part of the sequence - iris::alloy::tuple vec; + alloy::tuple vec; REQUIRE(parse("abc", char_ >> 'b' >> char_, vec)); - CHECK(iris::alloy::get<0>(vec) == 'a'); - CHECK(iris::alloy::get<1>(vec) == 'c'); + CHECK(alloy::get<0>(vec) == 'a'); + CHECK(alloy::get<1>(vec) == 'c'); } { // 'b' has an unused_type. unused attributes are not part of the sequence - iris::alloy::tuple vec; + alloy::tuple vec; REQUIRE(parse("acb", char_ >> char_ >> 'b', vec)); - CHECK(iris::alloy::get<0>(vec) == 'a'); - CHECK(iris::alloy::get<1>(vec) == 'c'); + CHECK(alloy::get<0>(vec) == 'a'); + CHECK(alloy::get<1>(vec) == 'c'); } { // "hello" has an unused_type. unused attributes are not part of the sequence - iris::alloy::tuple vec; + alloy::tuple vec; REQUIRE(parse("a hello c", char_ >> "hello" >> char_, space, vec)); - CHECK(iris::alloy::get<0>(vec) == 'a'); - CHECK(iris::alloy::get<1>(vec) == 'c'); + CHECK(alloy::get<0>(vec) == 'a'); + CHECK(alloy::get<1>(vec) == 'c'); } { @@ -116,9 +116,9 @@ TEST_CASE("sequence") { // a single element tuple - iris::alloy::tuple vec; + alloy::tuple vec; REQUIRE(parse("ab", char_ >> 'b', vec)); - CHECK(iris::alloy::get<0>(vec) == 'a'); + CHECK(alloy::get<0>(vec) == 'a'); } { @@ -129,7 +129,7 @@ TEST_CASE("sequence") // unwrap it). It's odd that the RHS (r) does not really have a // single element tuple, so the original comment is not accurate. - using attr_type = iris::alloy::tuple; + using attr_type = alloy::tuple; attr_type tpl; auto r = rule{} = char_ >> ',' >> int_; @@ -143,7 +143,7 @@ TEST_CASE("sequence") // has a single element tuple as its attribute. This is a correction // of the test above. - using attr_type = iris::alloy::tuple; + using attr_type = alloy::tuple; attr_type tpl; auto r = rule{} = int_; @@ -336,33 +336,33 @@ TEST_CASE("sequence") // Test from spirit mailing list // "Error with container within sequence" { - using attr_type = iris::alloy::tuple; + using attr_type = alloy::tuple; attr_type vec; constexpr auto r = *alnum; REQUIRE(parse("abcdef", r, vec)); - CHECK(iris::alloy::get<0>(vec) == "abcdef"); + CHECK(alloy::get<0>(vec) == "abcdef"); } { - using attr_type = iris::alloy::tuple>; + using attr_type = alloy::tuple>; attr_type vec; constexpr auto r = *int_; REQUIRE(parse("123 456", r, space, vec)); - REQUIRE(iris::alloy::get<0>(vec).size() == 2); - CHECK(iris::alloy::get<0>(vec)[0] == 123); - CHECK(iris::alloy::get<0>(vec)[1] == 456); + REQUIRE(alloy::get<0>(vec).size() == 2); + CHECK(alloy::get<0>(vec)[0] == 123); + CHECK(alloy::get<0>(vec)[1] == 456); } { // Non-flat optional - iris::alloy::tuple>> v; + alloy::tuple>> v; constexpr auto p = int_ >> -(':' >> int_ >> '-' >> int_); REQUIRE(parse("1:2-3", p, v)); - REQUIRE(iris::alloy::get<1>(v).has_value()); - CHECK(iris::alloy::get<0>(*iris::alloy::get<1>(v)) == 2); + REQUIRE(alloy::get<1>(v).has_value()); + CHECK(alloy::get<0>(*alloy::get<1>(v)) == 2); } // optional with container attribute @@ -370,15 +370,15 @@ TEST_CASE("sequence") constexpr auto p = char_ >> -(':' >> +char_); { - iris::alloy::tuple> v; + alloy::tuple> v; REQUIRE(parse("x", p, v)); - CHECK(!iris::alloy::get<1>(v).has_value()); + CHECK(!alloy::get<1>(v).has_value()); } { - iris::alloy::tuple> v; + alloy::tuple> v; REQUIRE(parse("x:abc", p, v)); - REQUIRE(iris::alloy::get<1>(v).has_value()); - CHECK(*iris::alloy::get<1>(v) == "abc"); + REQUIRE(alloy::get<1>(v).has_value()); + CHECK(*alloy::get<1>(v) == "abc"); } } @@ -410,8 +410,8 @@ TEST_CASE("sequence") char c = 0; int n = 0; auto f = [&](auto&& ctx) { - c = iris::alloy::get<0>(_attr(ctx)); - n = iris::alloy::get<1>(_attr(ctx)); + c = alloy::get<0>(_attr(ctx)); + n = alloy::get<1>(_attr(ctx)); }; REQUIRE(parse("x123\"a string\"", (char_ >> int_ >> "\"a string\"")[f])); @@ -424,8 +424,8 @@ TEST_CASE("sequence") char c = 0; int n = 0; auto f = [&](auto&& ctx) { - c = iris::alloy::get<0>(_attr(ctx)); - n = iris::alloy::get<1>(_attr(ctx)); + c = alloy::get<0>(_attr(ctx)); + n = alloy::get<1>(_attr(ctx)); }; REQUIRE(parse("x 123 \"a string\"", (char_ >> int_ >> "\"a string\"")[f], space)); diff --git a/test/x4/symbols3.cpp b/test/x4/symbols3.cpp index 7c55cb506..e943ff53b 100644 --- a/test/x4/symbols3.cpp +++ b/test/x4/symbols3.cpp @@ -32,7 +32,7 @@ struct roman }; template<> -struct iris::alloy::adaptor { +struct alloy::adaptor { using getters_list = make_getters_list<&roman::a, &roman::b, &roman::c>; };