From 5342bb5513e97afe4b2f5768924779f8804a3989 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Wed, 4 Mar 2026 19:21:27 +0900 Subject: [PATCH 1/8] Refactor `attribute_of_binary` implementation --- .../iris/x4/traits/attribute_of_binary.hpp | 57 +++++++------------ 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/include/iris/x4/traits/attribute_of_binary.hpp b/include/iris/x4/traits/attribute_of_binary.hpp index 6e7b4a109..5cb5977df 100644 --- a/include/iris/x4/traits/attribute_of_binary.hpp +++ b/include/iris/x4/traits/attribute_of_binary.hpp @@ -24,54 +24,40 @@ namespace iris::x4::traits { namespace detail { -template -struct append_to_type_list {}; - -template -using append_to_type_list_t = append_to_type_list::type; - -template -struct append_to_type_list> +template class TupleTT, class T> +struct tuple_to_type_list { - using type = type_list; + using type = type_list; }; -template -struct append_to_type_list, unused_type, Us...> - : append_to_type_list, Us...> -{}; - -template -struct append_to_type_list, U, Us...> - : append_to_type_list, Us...> -{}; - -template -struct append_to_type_list, type_list, Vs...> - : append_to_type_list, Us...>, Vs...> -{}; - -template class TupleTT, class T> -struct tuple_to_type_list; - -template class TupleTT, class T> -using tuple_to_type_list_t = tuple_to_type_list::type; - -template class TupleTT, class T> -struct tuple_to_type_list +template class TupleTT> +struct tuple_to_type_list { - using type = T; + using type = type_list<>; }; template class TupleTT, class... Ts> struct tuple_to_type_list> { - using type = type_list...>; + using type = type_list; }; template class TupleTT, class T> using tuple_to_type_list_t = tuple_to_type_list::type; +// Concatenate two type_lists (non-recursive, single pack expansion) +template +struct concat_type_list; + +template +struct concat_type_list, type_list> +{ + using type = type_list; +}; + +template +using concat_type_list_t = concat_type_list::type; + template class TupleTT, class TypeList> struct type_list_to_tuple {}; @@ -106,8 +92,7 @@ struct attribute_of_binary { using type = detail::type_list_to_tuple_t< TupleTT, - detail::append_to_type_list_t< - type_list<>, + detail::concat_type_list_t< detail::tuple_to_type_list_t::attribute_type>, detail::tuple_to_type_list_t::attribute_type> > From 9d0e3b1d3afb3ba6dd714226c2b7793dbb2206b2 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Wed, 4 Mar 2026 19:27:31 +0900 Subject: [PATCH 2/8] Remove trivial comment --- include/iris/x4/traits/attribute_of_binary.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/include/iris/x4/traits/attribute_of_binary.hpp b/include/iris/x4/traits/attribute_of_binary.hpp index 5cb5977df..f1a964fe7 100644 --- a/include/iris/x4/traits/attribute_of_binary.hpp +++ b/include/iris/x4/traits/attribute_of_binary.hpp @@ -45,7 +45,6 @@ struct tuple_to_type_list> template class TupleTT, class T> using tuple_to_type_list_t = tuple_to_type_list::type; -// Concatenate two type_lists (non-recursive, single pack expansion) template struct concat_type_list; From d55659c812b55c44c2b1a7ff8c0b660e7617e0c7 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Thu, 5 Mar 2026 01:58:01 +0900 Subject: [PATCH 3/8] Rename parameters --- include/iris/x4/traits/attribute_of_binary.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/iris/x4/traits/attribute_of_binary.hpp b/include/iris/x4/traits/attribute_of_binary.hpp index f1a964fe7..f0a62afbd 100644 --- a/include/iris/x4/traits/attribute_of_binary.hpp +++ b/include/iris/x4/traits/attribute_of_binary.hpp @@ -45,7 +45,7 @@ struct tuple_to_type_list> template class TupleTT, class T> using tuple_to_type_list_t = tuple_to_type_list::type; -template +template struct concat_type_list; template @@ -54,8 +54,8 @@ struct concat_type_list, type_list> using type = type_list; }; -template -using concat_type_list_t = concat_type_list::type; +template +using concat_type_list_t = concat_type_list::type; template class TupleTT, class TypeList> struct type_list_to_tuple {}; From 9793845770cb4df81338a222ca67d1c8f7ea8401 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Thu, 5 Mar 2026 03:28:55 +0900 Subject: [PATCH 4/8] Rename --- .../iris/x4/traits/attribute_of_binary.hpp | 73 +++++++++---------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/include/iris/x4/traits/attribute_of_binary.hpp b/include/iris/x4/traits/attribute_of_binary.hpp index f0a62afbd..b3b8aa657 100644 --- a/include/iris/x4/traits/attribute_of_binary.hpp +++ b/include/iris/x4/traits/attribute_of_binary.hpp @@ -12,7 +12,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ -#include #include #include @@ -24,76 +23,76 @@ namespace iris::x4::traits { namespace detail { -template class TupleTT, class T> -struct tuple_to_type_list +template +struct concat_type_list; + +template +struct concat_type_list, type_list> { - using type = type_list; + using type = type_list; }; -template class TupleTT> -struct tuple_to_type_list +template +using concat_type_list_t = concat_type_list::type; + +template class TT, class T> +struct to_type_list { - using type = type_list<>; + using type = type_list; }; -template class TupleTT, class... Ts> -struct tuple_to_type_list> +template class TT> +struct to_type_list { - using type = type_list; + using type = type_list<>; }; -template class TupleTT, class T> -using tuple_to_type_list_t = tuple_to_type_list::type; - -template -struct concat_type_list; - -template -struct concat_type_list, type_list> +template class TT, class... Ts> +struct to_type_list> { - using type = type_list; + using type = type_list; }; -template -using concat_type_list_t = concat_type_list::type; +template class TT, class T> +using to_type_list_t = to_type_list::type; -template class TupleTT, class TypeList> -struct type_list_to_tuple {}; +template class TT, class TypeList> +struct from_type_list {}; -template class TupleTT> -struct type_list_to_tuple> +template class TT> +struct from_type_list> { using type = unused_type; }; -template class TupleTT, class T> -struct type_list_to_tuple> +template class TT, class T> +struct from_type_list> { using type = T; }; -template class TupleTT, class T0, class T1, class... Ts> -struct type_list_to_tuple> +template class TT, class T0, class T1, class... Ts> +struct from_type_list> { - using type = TupleTT; + using type = TT; }; -template class TupleTT, class TypeList> -using type_list_to_tuple_t = type_list_to_tuple::type; +template class TT, class TypeList> +using from_type_list_t = from_type_list::type; } // detail template< - template class TupleTT, + template class TT, class LeftParser, class RightParser > struct attribute_of_binary { - using type = detail::type_list_to_tuple_t< - TupleTT, + using type = detail::from_type_list_t< + TT, detail::concat_type_list_t< - detail::tuple_to_type_list_t::attribute_type>, - detail::tuple_to_type_list_t::attribute_type> + detail::to_type_list_t::attribute_type>, + detail::to_type_list_t::attribute_type> > >; }; From acf5cbb9d350b4e98685ae127dc1c3ef1ba954fd Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Thu, 5 Mar 2026 03:52:26 +0900 Subject: [PATCH 5/8] Drop template template parameter --- include/iris/x4/operator/alternative.hpp | 2 +- include/iris/x4/operator/sequence.hpp | 2 +- .../iris/x4/traits/attribute_of_binary.hpp | 112 +++++++++--------- 3 files changed, 55 insertions(+), 61 deletions(-) diff --git a/include/iris/x4/operator/alternative.hpp b/include/iris/x4/operator/alternative.hpp index aefe652b3..832094a8b 100644 --- a/include/iris/x4/operator/alternative.hpp +++ b/include/iris/x4/operator/alternative.hpp @@ -43,7 +43,7 @@ struct alternative : binary_parser> using attribute_type = std::conditional_t< is_both_same_attribute, std::type_identity::attribute_type>, - traits::attribute_of_binary + traits::attribute_of_alternative >::type; // If canonicalized, proxy the underlying `sequence_size`. In other words: diff --git a/include/iris/x4/operator/sequence.hpp b/include/iris/x4/operator/sequence.hpp index 74a7aaea3..d68c340b9 100644 --- a/include/iris/x4/operator/sequence.hpp +++ b/include/iris/x4/operator/sequence.hpp @@ -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_sequence::type; static constexpr std::size_t sequence_size = parser_traits::sequence_size + parser_traits::sequence_size; diff --git a/include/iris/x4/traits/attribute_of_binary.hpp b/include/iris/x4/traits/attribute_of_binary.hpp index b3b8aa657..5d97004e6 100644 --- a/include/iris/x4/traits/attribute_of_binary.hpp +++ b/include/iris/x4/traits/attribute_of_binary.hpp @@ -35,67 +35,61 @@ struct concat_type_list, type_list> template using concat_type_list_t = concat_type_list::type; -template class TT, class T> -struct to_type_list -{ - using type = type_list; -}; - -template class TT> -struct to_type_list -{ - using type = type_list<>; -}; - -template class TT, class... Ts> -struct to_type_list> -{ - using type = type_list; -}; - -template class TT, class T> -using to_type_list_t = to_type_list::type; - -template class TT, class TypeList> -struct from_type_list {}; - -template class TT> -struct from_type_list> -{ - using type = unused_type; -}; - -template class TT, class T> -struct from_type_list> -{ - using type = T; -}; - -template class TT, class T0, class T1, class... Ts> -struct from_type_list> -{ - using type = TT; -}; - -template class TT, class TypeList> -using from_type_list_t = from_type_list::type; - } // detail -template< - template class TT, - class LeftParser, class RightParser -> -struct attribute_of_binary -{ - using type = detail::from_type_list_t< - TT, - detail::concat_type_list_t< - detail::to_type_list_t::attribute_type>, - detail::to_type_list_t::attribute_type> - > - >; -}; +#define IRIS_X4_TRAITS_DETAIL_DEFINE_TYPE_LIST_CONV(postfix, tmpl) \ + namespace detail { \ + template \ + struct to_type_list_##postfix \ + { \ + using type = type_list; \ + }; \ + template<> \ + struct to_type_list_##postfix \ + { \ + using type = type_list<>; \ + }; \ + template \ + struct to_type_list_##postfix> \ + { \ + using type = type_list; \ + }; \ + template \ + using to_type_list_##postfix##_t = to_type_list_##postfix::type; \ + template \ + struct from_type_list_##postfix {}; \ + template<> \ + struct from_type_list_##postfix> \ + { \ + using type = unused_type; \ + }; \ + template \ + struct from_type_list_##postfix> \ + { \ + using type = T; \ + }; \ + template \ + struct from_type_list_##postfix> \ + { \ + using type = tmpl; \ + }; \ + template \ + using from_type_list_##postfix##_t = from_type_list_##postfix::type; \ + } \ + template \ + struct attribute_of_##postfix { \ + using type = detail::from_type_list_##postfix##_t< \ + detail::concat_type_list_t< \ + detail::to_type_list_##postfix##_t::attribute_type>, \ + detail::to_type_list_##postfix##_t::attribute_type> \ + > \ + >; \ + }; + +IRIS_X4_TRAITS_DETAIL_DEFINE_TYPE_LIST_CONV(sequence, alloy::tuple) +IRIS_X4_TRAITS_DETAIL_DEFINE_TYPE_LIST_CONV(alternative, rvariant) + +#undef IRIS_X4_TRAITS_DETAIL_DEFINE_TYPE_LIST_CONV } // iris::x4::traits From fb3911e34044437ba58c620e6746dc14239c0ec7 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Thu, 5 Mar 2026 04:02:23 +0900 Subject: [PATCH 6/8] Remove unused header inclusion --- include/iris/x4/traits/attribute_of_binary.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/iris/x4/traits/attribute_of_binary.hpp b/include/iris/x4/traits/attribute_of_binary.hpp index 5d97004e6..c0f54b13b 100644 --- a/include/iris/x4/traits/attribute_of_binary.hpp +++ b/include/iris/x4/traits/attribute_of_binary.hpp @@ -17,8 +17,6 @@ #include // TODO: move iris::type_list to separate header -#include - namespace iris::x4::traits { namespace detail { From 5233a2b1fb3a99c9bc06d11cbdaf651e7657f5aa Mon Sep 17 00:00:00 2001 From: Nana Sakisaka <1901813+saki7@users.noreply.github.com> Date: Thu, 5 Mar 2026 09:52:44 +0900 Subject: [PATCH 7/8] Drop `_t` type aliases to reduce instantiation complexity --- .../iris/x4/core/detail/parse_alternative.hpp | 4 +- .../x4/core/detail/parse_into_container.hpp | 7 +- .../iris/x4/core/detail/parse_sequence.hpp | 2 +- include/iris/x4/directive/repeat.hpp | 2 +- include/iris/x4/operator/alternative.hpp | 27 +++++-- include/iris/x4/operator/kleene.hpp | 2 +- include/iris/x4/operator/list.hpp | 2 +- include/iris/x4/operator/optional.hpp | 12 ++-- include/iris/x4/operator/plus.hpp | 2 +- include/iris/x4/operator/sequence.hpp | 2 +- .../iris/x4/string/detail/string_parse.hpp | 4 +- .../iris/x4/traits/attribute_of_binary.hpp | 70 +++++++++++++------ include/iris/x4/traits/container_traits.hpp | 6 -- include/iris/x4/traits/optional_traits.hpp | 6 -- include/iris/x4/traits/substitution.hpp | 2 +- 15 files changed, 92 insertions(+), 58 deletions(-) diff --git a/include/iris/x4/core/detail/parse_alternative.hpp b/include/iris/x4/core/detail/parse_alternative.hpp index 0cb5f9203..7162d07ec 100644 --- a/include/iris/x4/core/detail/parse_alternative.hpp +++ b/include/iris/x4/core/detail/parse_alternative.hpp @@ -230,7 +230,7 @@ struct parse_into_container_impl> using parser_type = alternative; template Se, class Context, X4Attribute Attr> - requires traits::is_variant_v> + requires traits::is_variant_v::type> [[nodiscard]] static constexpr bool call( parser_type const& parser, @@ -242,7 +242,7 @@ struct parse_into_container_impl> } template Se, class Context, X4Attribute Attr> - requires (!traits::is_variant_v>) + requires (!traits::is_variant_v::type>) [[nodiscard]] static constexpr bool call( parser_type const& parser, diff --git a/include/iris/x4/core/detail/parse_into_container.hpp b/include/iris/x4/core/detail/parse_into_container.hpp index 0da6f707a..2593828b7 100644 --- a/include/iris/x4/core/detail/parse_into_container.hpp +++ b/include/iris/x4/core/detail/parse_into_container.hpp @@ -48,8 +48,7 @@ struct parse_into_container_base_impl { static_assert(!std::same_as, unused_container_type>); - using value_type = traits::container_value_t>; - value_type val; // default-initialize + typename traits::container_value>::type val{}; // value-initialize //static_assert(Parsable); if (!parser.parse(first, last, ctx, val)) return false; @@ -149,7 +148,7 @@ struct parse_into_container_impl It, Se, Context, typename parser_traits::attribute_type >::actual_type, - traits::container_value_t + typename traits::container_value::type >> >; @@ -217,7 +216,7 @@ parse_into_container( using attribute_type = parser_traits::attribute_type; // e.g. `std::string` when the attribute_type is `char` - using substitute_type = traits::variant_find_substitute_t>; + using substitute_type = traits::variant_find_substitute_t::type>; // instead of creating a temporary `substitute_type`, append directly into the emplaced alternative auto& variant_alt = attr.template emplace(); diff --git a/include/iris/x4/core/detail/parse_sequence.hpp b/include/iris/x4/core/detail/parse_sequence.hpp index 28df3abf1..61242686f 100644 --- a/include/iris/x4/core/detail/parse_sequence.hpp +++ b/include/iris/x4/core/detail/parse_sequence.hpp @@ -284,7 +284,7 @@ struct parse_into_container_impl> template static constexpr bool is_container_substitute = traits::is_substitute_v< typename sequence::attribute_type, - traits::container_value_t + typename traits::container_value::type >; template Se, class Context, X4Attribute Attr> diff --git a/include/iris/x4/directive/repeat.hpp b/include/iris/x4/directive/repeat.hpp index 9dc8db3c2..5bf43d63d 100644 --- a/include/iris/x4/directive/repeat.hpp +++ b/include/iris/x4/directive/repeat.hpp @@ -87,7 +87,7 @@ template struct repeat_directive : proxy_parser> { using base_type = proxy_parser; - using attribute_type = traits::build_container_t::attribute_type>; + using attribute_type = traits::build_container::attribute_type>::type; static constexpr bool handles_container = true; diff --git a/include/iris/x4/operator/alternative.hpp b/include/iris/x4/operator/alternative.hpp index 8a16e2f79..2746a15e5 100644 --- a/include/iris/x4/operator/alternative.hpp +++ b/include/iris/x4/operator/alternative.hpp @@ -29,6 +29,27 @@ namespace iris::x4 { +namespace detail { + +template +struct alternative_attribute_impl; + +// Both same attribute +template +struct alternative_attribute_impl +{ + using type = parser_traits::attribute_type; +}; + +// Not same attribute +template +struct alternative_attribute_impl +{ + using type = traits::detail::attribute_of_alternative::type; +}; + +} // detail + template struct alternative : binary_parser> { @@ -40,10 +61,8 @@ struct alternative : binary_parser> public: // Canonicalize `rvariant` to `X` - using attribute_type = std::conditional_t< - is_both_same_attribute, - std::type_identity::attribute_type>, - traits::attribute_of_alternative + using attribute_type = detail::alternative_attribute_impl< + is_both_same_attribute, Left, Right >::type; // If canonicalized, proxy the underlying `sequence_size`. In other words: diff --git a/include/iris/x4/operator/kleene.hpp b/include/iris/x4/operator/kleene.hpp index 1785f3935..0289ce968 100644 --- a/include/iris/x4/operator/kleene.hpp +++ b/include/iris/x4/operator/kleene.hpp @@ -28,7 +28,7 @@ namespace iris::x4 { template struct kleene : unary_parser> { - using attribute_type = traits::build_container_t::attribute_type>; + using attribute_type = traits::build_container::attribute_type>::type; static constexpr bool handles_container = true; diff --git a/include/iris/x4/operator/list.hpp b/include/iris/x4/operator/list.hpp index 9270aa6d7..c6d9039b9 100644 --- a/include/iris/x4/operator/list.hpp +++ b/include/iris/x4/operator/list.hpp @@ -28,7 +28,7 @@ namespace iris::x4 { template struct list : binary_parser> { - using attribute_type = traits::build_container_t::attribute_type>; + using attribute_type = traits::build_container::attribute_type>::type; static constexpr bool handles_container = true; diff --git a/include/iris/x4/operator/optional.hpp b/include/iris/x4/operator/optional.hpp index a259a33fa..498b30f87 100644 --- a/include/iris/x4/operator/optional.hpp +++ b/include/iris/x4/operator/optional.hpp @@ -30,7 +30,7 @@ namespace iris::x4 { template struct optional : unary_parser> { - using attribute_type = traits::build_optional_t::attribute_type>; + using attribute_type = traits::build_optional::attribute_type>::type; static constexpr bool handles_container = true; @@ -82,15 +82,13 @@ struct optional : unary_parser> [[nodiscard]] constexpr bool parse(It& first, Se const& last, Context const& ctx, Attr& attr) const noexcept( - std::is_nothrow_default_constructible_v> && - is_nothrow_parsable_v> && - noexcept(x4::move_to(std::declval&&>(), attr)) + std::is_nothrow_default_constructible_v::type> && + is_nothrow_parsable_v::type> && + noexcept(x4::move_to(std::declval::type&&>(), attr)) ) { - using value_type = x4::traits::optional_value_t; - value_type val; // default-initialize + typename traits::optional_value::type val{}; // value-initialize - static_assert(Parsable); if (this->subject.parse(first, last, ctx, val)) { // assign the parsed value into our attribute x4::move_to(std::move(val), attr); diff --git a/include/iris/x4/operator/plus.hpp b/include/iris/x4/operator/plus.hpp index 45f1ce0e9..4b16ca713 100644 --- a/include/iris/x4/operator/plus.hpp +++ b/include/iris/x4/operator/plus.hpp @@ -28,7 +28,7 @@ namespace iris::x4 { template struct plus : unary_parser> { - using attribute_type = traits::build_container_t::attribute_type>; + using attribute_type = traits::build_container::attribute_type>::type; static constexpr bool handles_container = true; diff --git a/include/iris/x4/operator/sequence.hpp b/include/iris/x4/operator/sequence.hpp index e07ff72ec..67109b1a9 100644 --- a/include/iris/x4/operator/sequence.hpp +++ b/include/iris/x4/operator/sequence.hpp @@ -31,7 +31,7 @@ namespace iris::x4 { template struct sequence : binary_parser> { - using attribute_type = traits::attribute_of_sequence::type; + using attribute_type = traits::detail::attribute_of_sequence::type; static constexpr std::size_t sequence_size = parser_traits::sequence_size + parser_traits::sequence_size; diff --git a/include/iris/x4/string/detail/string_parse.hpp b/include/iris/x4/string/detail/string_parse.hpp index c027248d0..945a6a732 100644 --- a/include/iris/x4/string/detail/string_parse.hpp +++ b/include/iris/x4/string/detail/string_parse.hpp @@ -32,7 +32,7 @@ string_parse( { using synthesized_value_type = traits::synthesized_value_t; static_assert(std::same_as, traits::container_attr>); - using value_type = traits::container_value_t; + using value_type = traits::container_value::type; static_assert(!traits::CharLike || std::same_as, "Mixing incompatible char types is not allowed"); It it = first; @@ -79,7 +79,7 @@ string_parse( { using synthesized_value_type = traits::synthesized_value_t; static_assert(std::same_as, traits::container_attr>); - using value_type = traits::container_value_t; + using value_type = traits::container_value::type; static_assert(!traits::CharLike || std::same_as, "Mixing incompatible char types is not allowed"); auto uc_it = ucstr.begin(); diff --git a/include/iris/x4/traits/attribute_of_binary.hpp b/include/iris/x4/traits/attribute_of_binary.hpp index 686cf7a9b..87fd59bae 100644 --- a/include/iris/x4/traits/attribute_of_binary.hpp +++ b/include/iris/x4/traits/attribute_of_binary.hpp @@ -30,13 +30,8 @@ struct concat_type_list, type_list> using type = type_list; }; -template -using concat_type_list_t = concat_type_list::type; - -} // detail - +#if 0 #define IRIS_X4_TRAITS_DETAIL_DEFINE_TYPE_LIST_CONV(postfix, tmpl) \ - namespace detail { \ template \ struct to_type_list_##postfix \ { \ @@ -52,8 +47,7 @@ using concat_type_list_t = concat_type_list::type; { \ using type = type_list; \ }; \ - template \ - using to_type_list_##postfix##_t = to_type_list_##postfix::type; \ + \ template \ struct from_type_list_##postfix {}; \ template<> \ @@ -71,23 +65,59 @@ using concat_type_list_t = concat_type_list::type; { \ using type = tmpl; \ }; \ - template \ - using from_type_list_##postfix##_t = from_type_list_##postfix::type; \ - } \ + \ template \ struct attribute_of_##postfix { \ - using type = detail::from_type_list_##postfix##_t< \ - detail::concat_type_list_t< \ - detail::to_type_list_##postfix##_t::attribute_type>, \ - detail::to_type_list_##postfix##_t::attribute_type> \ - > \ - >; \ + using type = detail::from_type_list_##postfix< \ + typename detail::concat_type_list< \ + typename detail::to_type_list_##postfix::attribute_type>::type, \ + typename detail::to_type_list_##postfix::attribute_type>::type \ + >::type \ + >::type; \ }; +#endif + +// +// AUTOGENERATED CODE; DO NOT EDIT. +// Expanded using Visual Studio's "Expand Inline" feature. +// Code style is kept as-is. +// + +// IRIS_X4_TRAITS_DETAIL_DEFINE_TYPE_LIST_CONV(sequence, alloy::tuple) +template struct to_type_list_sequence { + using type = type_list; +}; template<> struct to_type_list_sequence { + using type = type_list<>; +}; template struct to_type_list_sequence> { + using type = type_list; +}; template struct from_type_list_sequence {}; template<> struct from_type_list_sequence> { + using type = unused_type; +}; template struct from_type_list_sequence> { + using type = T; +}; template struct from_type_list_sequence> { + using type = alloy::tuple; +}; template struct attribute_of_sequence { + using type = detail::from_type_list_sequence< typename detail::concat_type_list< typename detail::to_type_list_sequence::attribute_type>::type, typename detail::to_type_list_sequence::attribute_type>::type >::type >::type; +}; -IRIS_X4_TRAITS_DETAIL_DEFINE_TYPE_LIST_CONV(sequence, alloy::tuple) -IRIS_X4_TRAITS_DETAIL_DEFINE_TYPE_LIST_CONV(alternative, rvariant) +// IRIS_X4_TRAITS_DETAIL_DEFINE_TYPE_LIST_CONV(alternative, rvariant) +template struct to_type_list_alternative { + using type = type_list; +}; template<> struct to_type_list_alternative { + using type = type_list<>; +}; template struct to_type_list_alternative> { + using type = type_list; +}; template struct from_type_list_alternative {}; template<> struct from_type_list_alternative> { + using type = unused_type; +}; template struct from_type_list_alternative> { + using type = T; +}; template struct from_type_list_alternative> { + using type = rvariant; +}; template struct attribute_of_alternative { + using type = detail::from_type_list_alternative< typename detail::concat_type_list< typename detail::to_type_list_alternative::attribute_type>::type, typename detail::to_type_list_alternative::attribute_type>::type >::type >::type; +}; -#undef IRIS_X4_TRAITS_DETAIL_DEFINE_TYPE_LIST_CONV +} // detail } // iris::x4::traits diff --git a/include/iris/x4/traits/container_traits.hpp b/include/iris/x4/traits/container_traits.hpp index b768b1fc5..b48db67e7 100644 --- a/include/iris/x4/traits/container_traits.hpp +++ b/include/iris/x4/traits/container_traits.hpp @@ -84,9 +84,6 @@ struct container_value : detail::remove_value_const {}; -template -using container_value_t = typename container_value::type; - template struct container_value : container_value {}; @@ -476,9 +473,6 @@ struct build_container using type = std::vector; }; -template -using build_container_t = typename build_container::type; - template struct build_container> : build_container {}; diff --git a/include/iris/x4/traits/optional_traits.hpp b/include/iris/x4/traits/optional_traits.hpp index 036798150..ab7b4d803 100644 --- a/include/iris/x4/traits/optional_traits.hpp +++ b/include/iris/x4/traits/optional_traits.hpp @@ -41,9 +41,6 @@ struct build_optional using type = std::optional; }; -template -using build_optional_t = typename build_optional::type; - template struct build_optional> { @@ -69,9 +66,6 @@ struct optional_value using type = typename T::value_type; }; -template -using optional_value_t = typename optional_value::type; - template<> struct optional_value { diff --git a/include/iris/x4/traits/substitution.hpp b/include/iris/x4/traits/substitution.hpp index d8c04a51d..f675231ea 100644 --- a/include/iris/x4/traits/substitution.hpp +++ b/include/iris/x4/traits/substitution.hpp @@ -52,7 +52,7 @@ struct is_all_substitute_for_tuple : is_all_substitute_for_tuple template struct value_type_is_substitute - : is_substitute, container_value_t> + : is_substitute::type, typename container_value::type> {}; template From 2e2fc89f98e350b917d5c5624b0af6d8fdb7a632 Mon Sep 17 00:00:00 2001 From: Nana Sakisaka <1901813+saki7@users.noreply.github.com> Date: Thu, 5 Mar 2026 09:53:04 +0900 Subject: [PATCH 8/8] Update iris --- modules/iris | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/iris b/modules/iris index 32d9fd929..cec583eed 160000 --- a/modules/iris +++ b/modules/iris @@ -1 +1 @@ -Subproject commit 32d9fd9299bff648b9852b1bb822f2c53cbd62f2 +Subproject commit cec583eed7ab2fb70e7ef6aa52ab840bc03e92ca