From e002e429106dd57b3698e83ee31e4d7f1f99ee7c Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sat, 11 Feb 2023 21:52:40 +0300 Subject: [PATCH 1/4] make the result type of boost::pfr::get exactly match std::get --- include/boost/pfr/core.hpp | 4 +- include/boost/pfr/detail/core17.hpp | 12 +- include/boost/pfr/detail/core17_generated.hpp | 451 +++++++++--------- include/boost/pfr/detail/sequence_tuple.hpp | 8 +- test/core/run/tuple_types_match.cpp | 70 +++ 5 files changed, 325 insertions(+), 220 deletions(-) create mode 100644 test/core/run/tuple_types_match.cpp diff --git a/include/boost/pfr/core.hpp b/include/boost/pfr/core.hpp index 8943ab99..0344d72b 100644 --- a/include/boost/pfr/core.hpp +++ b/include/boost/pfr/core.hpp @@ -66,8 +66,8 @@ constexpr auto get(T&, std::enable_if_t::value>* = nul /// \overload get template -constexpr auto get(T&& val, std::enable_if_t< std::is_rvalue_reference::value>* = nullptr) noexcept { - return std::move(detail::sequence_tuple::get( detail::tie_as_tuple(val) )); +constexpr decltype(auto) get(T&& val, std::enable_if_t< std::is_rvalue_reference::value>* = nullptr) noexcept { + return detail::sequence_tuple::get( detail::tie_as_tuple(std::forward(val)) ); } diff --git a/include/boost/pfr/detail/core17.hpp b/include/boost/pfr/detail/core17.hpp index cf7ccd62..8808e779 100644 --- a/include/boost/pfr/detail/core17.hpp +++ b/include/boost/pfr/detail/core17.hpp @@ -52,10 +52,20 @@ constexpr auto tie_as_tuple(T& val) noexcept { !std::is_union::value, "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for more info." ); - typedef size_t_()> fields_count_tag; + typedef size_t_()> fields_count_tag; return boost::pfr::detail::tie_as_tuple(val, fields_count_tag{}); } +template +constexpr auto tie_as_tuple(T&& val) noexcept { + static_assert( + !std::is_union::value, + "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for more info." + ); + typedef size_t_()> fields_count_tag; + return boost::pfr::detail::tie_as_tuple(std::forward(val), fields_count_tag{}); +} + template void for_each_field_dispatcher(T& t, F&& f, std::index_sequence) { static_assert( diff --git a/include/boost/pfr/detail/core17_generated.hpp b/include/boost/pfr/detail/core17_generated.hpp index 8052096b..f54febbb 100644 --- a/include/boost/pfr/detail/core17_generated.hpp +++ b/include/boost/pfr/detail/core17_generated.hpp @@ -27,59 +27,78 @@ namespace boost { namespace pfr { namespace detail { template constexpr auto make_tuple_of_references(Args&&... args) noexcept { - return sequence_tuple::tuple{ args... }; + return sequence_tuple::tuple{ static_cast(args)... }; } template constexpr decltype(auto) add_cv_like(Arg& arg) noexcept { - if constexpr (std::is_const::value && std::is_volatile::value) { - return const_cast(arg); - } - else if constexpr (std::is_const::value) { - return const_cast(arg); - } - else if constexpr (std::is_volatile::value) { - return const_cast(arg); - } - else { - return const_cast(arg); + if constexpr (std::is_rvalue_reference::value) { + if constexpr (std::is_const::value && std::is_volatile::value) { + return const_cast(arg); + } + else if constexpr (std::is_const::value) { + return const_cast(arg); + } + else if constexpr (std::is_volatile::value) { + return const_cast(arg); + } + else { + return const_cast(arg); + } + } else { + if constexpr (std::is_const::value && std::is_volatile::value) { + return const_cast(arg); + } + else if constexpr (std::is_const::value) { + return const_cast(arg); + } + else if constexpr (std::is_volatile::value) { + return const_cast(arg); + } + else { + return const_cast(arg); + } } } // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78939 template constexpr decltype(auto) workaround_cast(Arg& arg) noexcept { - using output_arg_t = std::conditional_t(), decltype(detail::add_cv_like(arg)), Sb>; + using output_arg_t = std::conditional_t< + !std::is_reference(), + decltype(detail::add_cv_like(arg)), + std::conditional_t::value, Sb&&, Sb&> + >; return const_cast(arg); } template -constexpr auto tie_as_tuple(T& /*val*/, size_t_<0>) noexcept { +constexpr auto tie_as_tuple(T&& /*val*/, size_t_<0>) noexcept { return sequence_tuple::tuple<>{}; } template -constexpr auto tie_as_tuple(T& val, size_t_<1>, std::enable_if_t >::value>* = nullptr) noexcept { - auto& [a] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<1>, std::enable_if_t >::value>* = nullptr) noexcept { + auto&& [a] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references(detail::workaround_cast(a)); } template -constexpr auto tie_as_tuple(T& val, size_t_<1>, std::enable_if_t >::value>* = nullptr) noexcept { +constexpr auto tie_as_tuple(T&& val, size_t_<1>, std::enable_if_t >::value>* = nullptr) noexcept { return ::boost::pfr::detail::make_tuple_of_references( val ); } template -constexpr auto tie_as_tuple(T& val, size_t_<2>) noexcept { - auto& [a,b] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<2>) noexcept { + auto&& [a,b] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references(detail::workaround_cast(a),detail::workaround_cast(b)); } template -constexpr auto tie_as_tuple(T& val, size_t_<3>) noexcept { - auto& [a,b,c] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<3>) noexcept { + auto&& [a,b,c] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c) @@ -87,8 +106,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<3>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<4>) noexcept { - auto& [a,b,c,d] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<4>) noexcept { + auto&& [a,b,c,d] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -97,8 +116,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<4>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<5>) noexcept { - auto& [a,b,c,d,e] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<5>) noexcept { + auto&& [a,b,c,d,e] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -107,8 +126,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<5>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<6>) noexcept { - auto& [a,b,c,d,e,f] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<6>) noexcept { + auto&& [a,b,c,d,e,f] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -117,8 +136,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<6>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<7>) noexcept { - auto& [a,b,c,d,e,f,g] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<7>) noexcept { + auto&& [a,b,c,d,e,f,g] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -128,8 +147,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<7>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<8>) noexcept { - auto& [a,b,c,d,e,f,g,h] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<8>) noexcept { + auto&& [a,b,c,d,e,f,g,h] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -139,8 +158,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<8>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<9>) noexcept { - auto& [a,b,c,d,e,f,g,h,j] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<9>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -150,8 +169,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<9>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<10>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<10>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -162,8 +181,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<10>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<11>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<11>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -174,8 +193,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<11>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<12>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<12>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -186,8 +205,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<12>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<13>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<13>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -199,8 +218,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<13>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<14>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<14>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -212,8 +231,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<14>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<15>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<15>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -225,8 +244,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<15>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<16>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<16>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -239,8 +258,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<16>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<17>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<17>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -253,8 +272,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<17>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<18>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<18>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -267,8 +286,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<18>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<19>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<19>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -282,8 +301,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<19>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<20>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<20>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -297,8 +316,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<20>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<21>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<21>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -312,8 +331,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<21>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<22>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<22>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -328,8 +347,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<22>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<23>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<23>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -344,8 +363,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<23>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<24>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<24>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -360,8 +379,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<24>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<25>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<25>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -377,8 +396,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<25>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<26>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<26>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -394,8 +413,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<26>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<27>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<27>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -411,8 +430,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<27>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<28>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<28>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -429,8 +448,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<28>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<29>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<29>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -447,8 +466,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<29>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<30>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<30>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -465,8 +484,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<30>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<31>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<31>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -484,8 +503,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<31>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<32>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<32>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -503,8 +522,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<32>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<33>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<33>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -522,8 +541,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<33>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<34>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<34>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -542,8 +561,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<34>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<35>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<35>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -562,8 +581,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<35>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<36>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<36>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -582,8 +601,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<36>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<37>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<37>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -603,8 +622,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<37>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<38>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<38>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -624,8 +643,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<38>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<39>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<39>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -645,8 +664,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<39>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<40>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<40>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -667,8 +686,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<40>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<41>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<41>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -689,8 +708,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<41>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<42>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<42>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -711,8 +730,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<42>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<43>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<43>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -734,8 +753,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<43>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<44>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<44>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -757,8 +776,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<44>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<45>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<45>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -780,8 +799,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<45>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<46>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<46>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -804,8 +823,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<46>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<47>) noexcept { - auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<47>) noexcept { + auto&& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references( detail::workaround_cast(a),detail::workaround_cast(b),detail::workaround_cast(c), @@ -828,8 +847,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<47>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<48>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<48>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -855,8 +874,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<48>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<49>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<49>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -883,8 +902,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<49>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<50>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<50>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -911,8 +930,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<50>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<51>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<51>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -939,8 +958,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<51>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<52>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<52>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -968,8 +987,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<52>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<53>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<53>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -997,8 +1016,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<53>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<54>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<54>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1026,8 +1045,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<54>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<55>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<55>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1056,8 +1075,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<55>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<56>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<56>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1086,8 +1105,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<56>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<57>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<57>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1116,8 +1135,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<57>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<58>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<58>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1147,8 +1166,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<58>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<59>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<59>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1178,8 +1197,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<59>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<60>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<60>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1209,8 +1228,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<60>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<61>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<61>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1241,8 +1260,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<61>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<62>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<62>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1273,8 +1292,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<62>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<63>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<63>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1305,8 +1324,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<63>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<64>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<64>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1338,8 +1357,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<64>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<65>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<65>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1371,8 +1390,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<65>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<66>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<66>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1404,8 +1423,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<66>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<67>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<67>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1438,8 +1457,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<67>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<68>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<68>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1472,8 +1491,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<68>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<69>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<69>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1506,8 +1525,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<69>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<70>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<70>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1541,8 +1560,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<70>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<71>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<71>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1576,8 +1595,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<71>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<72>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<72>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1611,8 +1630,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<72>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<73>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<73>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1647,8 +1666,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<73>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<74>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<74>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1683,8 +1702,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<74>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<75>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<75>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1719,8 +1738,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<75>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<76>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<76>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1756,8 +1775,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<76>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<77>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<77>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1793,8 +1812,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<77>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<78>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<78>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1830,8 +1849,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<78>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<79>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<79>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1868,8 +1887,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<79>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<80>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<80>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1906,8 +1925,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<80>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<81>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<81>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1944,8 +1963,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<81>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<82>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<82>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -1983,8 +2002,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<82>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<83>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<83>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2022,8 +2041,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<83>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<84>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<84>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2061,8 +2080,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<84>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<85>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<85>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2101,8 +2120,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<85>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<86>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<86>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2141,8 +2160,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<86>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<87>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<87>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2181,8 +2200,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<87>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<88>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<88>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2222,8 +2241,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<88>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<89>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<89>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2263,8 +2282,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<89>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<90>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<90>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2304,8 +2323,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<90>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<91>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<91>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2346,8 +2365,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<91>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<92>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<92>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2388,8 +2407,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<92>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<93>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<93>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2430,8 +2449,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<93>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<94>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<94>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. @@ -2473,8 +2492,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<94>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<95>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<95>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, ba @@ -2517,8 +2536,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<95>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<96>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<96>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, ba,bb @@ -2561,8 +2580,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<96>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<97>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<97>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, ba,bb,bc @@ -2606,8 +2625,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<97>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<98>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<98>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, ba,bb,bc,bd @@ -2651,8 +2670,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<98>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<99>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<99>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, ba,bb,bc,bd,be @@ -2696,8 +2715,8 @@ constexpr auto tie_as_tuple(T& val, size_t_<99>) noexcept { } template -constexpr auto tie_as_tuple(T& val, size_t_<100>) noexcept { - auto& [ +constexpr auto tie_as_tuple(T&& val, size_t_<100>) noexcept { + auto&& [ a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, ba,bb,bc,bd,be,bf @@ -2743,7 +2762,7 @@ constexpr auto tie_as_tuple(T& val, size_t_<100>) noexcept { template -constexpr void tie_as_tuple(T& /*val*/, size_t_) noexcept { +constexpr void tie_as_tuple(T&& /*val*/, size_t_) noexcept { static_assert(sizeof(T) && false, "====================> Boost.PFR: Too many fields in a structure T. Regenerate include/boost/pfr/detail/core17_generated.hpp file for appropriate count of fields. For example: `python ./misc/generate_cpp17.py 300 > include/boost/pfr/detail/core17_generated.hpp`"); } diff --git a/include/boost/pfr/detail/sequence_tuple.hpp b/include/boost/pfr/detail/sequence_tuple.hpp index 518bf76b..2805ad74 100644 --- a/include/boost/pfr/detail/sequence_tuple.hpp +++ b/include/boost/pfr/detail/sequence_tuple.hpp @@ -39,7 +39,7 @@ struct tuple_base< std::index_sequence, Tail... > constexpr tuple_base(const tuple_base&) = default; constexpr tuple_base(Tail... v) noexcept - : base_from_member{ v }... + : base_from_member{ static_cast(v) }... {} }; @@ -78,6 +78,12 @@ constexpr T&& get_impl(base_from_member&& t) noexcept { return std::forward(t.value); } +template +constexpr const T&& get_impl(const base_from_member&& t) noexcept { + // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn) + return std::forward(t.value); +} + template struct tuple: tuple_base< diff --git a/test/core/run/tuple_types_match.cpp b/test/core/run/tuple_types_match.cpp new file mode 100644 index 00000000..3db0f7c7 --- /dev/null +++ b/test/core/run/tuple_types_match.cpp @@ -0,0 +1,70 @@ +// Copyright (c) 2016-2023 Antony Polukhin +// +// 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 + + +template +void test_get_matches_tuple(T x, U y) { + const auto& x_cref = x; + const auto& y_cref = y; + + BOOST_TEST_EQ(boost::pfr::get<0>(x), std::get<0>(y)); + BOOST_TEST_EQ(boost::pfr::get<1>(x), std::get<1>(y)); + BOOST_TEST_EQ(boost::pfr::get<0>(x_cref), std::get<0>(y_cref)); + BOOST_TEST_EQ(boost::pfr::get<1>(x_cref), std::get<1>(y_cref)); + BOOST_TEST_EQ(boost::pfr::get<0>(std::move(x_cref)), std::get<0>(std::move(y_cref))); + BOOST_TEST_EQ(boost::pfr::get<1>(std::move(x_cref)), std::get<1>(std::move(y_cref))); + BOOST_TEST_EQ(boost::pfr::get<0>(std::move(x)), std::get<0>(std::move(y))); + BOOST_TEST_EQ(boost::pfr::get<1>(std::move(x)), std::get<1>(std::move(y))); + + static_assert(std::is_same_v(x)), decltype(std::get<0>(y))>); + static_assert(std::is_same_v(x)), decltype(std::get<1>(y))>); + + static_assert(std::is_same_v(x_cref)), decltype(std::get<0>(y_cref))>); + static_assert(std::is_same_v(x_cref)), decltype(std::get<1>(y_cref))>); + + static_assert(std::is_same_v(std::move(x_cref))), decltype(std::get<0>(std::move(y_cref)))>); + static_assert(std::is_same_v(std::move(x_cref))), decltype(std::get<1>(std::move(y_cref)))>); + static_assert(std::is_same_v(std::move(x))), decltype(std::get<0>(std::move(y)))>); + static_assert(std::is_same_v(std::move(x))), decltype(std::get<1>(std::move(y)))>); +} + +int main() { + struct aggregate { int first; char second; }; + struct aggregate_const { const int first; const char second; }; + + test_get_matches_tuple(aggregate{1, 2}, std::tuple{1, 2}); + test_get_matches_tuple(aggregate_const{1, 2}, std::tuple{1, 2}); + + int first = 1; char second; + struct aggregate_ref { int& first; char& second; }; + struct aggregate_const_ref { const int& first; const char& second; }; + test_get_matches_tuple( + aggregate_ref{first, second}, + std::tuple{first, second} + ); + test_get_matches_tuple( + aggregate_const_ref{first, second}, + std::tuple{first, second} + ); + + struct aggregate_rref { int&& first; char&& second; }; + struct aggregate_const_rref { const int&& first; const char&& second; }; + test_get_matches_tuple( + aggregate_rref{std::move(first), std::move(second)}, + std::tuple{std::move(first), std::move(second)} + ); + test_get_matches_tuple( + aggregate_const_rref{std::move(first), std::move(second)}, + std::tuple{std::move(first), std::move(second)} + ); +} + From 19d5a1d0e610cab52bfc537ddcfca7ef41a65946 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sun, 12 Feb 2023 19:39:49 +0300 Subject: [PATCH 2/4] test fixes --- test/core/run/tuple_types_match.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/core/run/tuple_types_match.cpp b/test/core/run/tuple_types_match.cpp index 3db0f7c7..4c56be08 100644 --- a/test/core/run/tuple_types_match.cpp +++ b/test/core/run/tuple_types_match.cpp @@ -35,9 +35,16 @@ void test_get_matches_tuple(T x, U y) { static_assert(std::is_same_v(std::move(x_cref))), decltype(std::get<1>(std::move(y_cref)))>); static_assert(std::is_same_v(std::move(x))), decltype(std::get<0>(std::move(y)))>); static_assert(std::is_same_v(std::move(x))), decltype(std::get<1>(std::move(y)))>); + + // TODO: tuple_element_t + //static_assert(std::is_same_v, std::tuple_element_t<0, U> >); + //static_assert(std::is_same_v, std::tuple_element_t<1, U> >); + //static_assert(std::is_same_v, std::tuple_element_t<0, const U> >); + //static_assert(std::is_same_v, std::tuple_element_t<1, const U> >); } int main() { +#if BOOST_PFR_USE_CPP17 struct aggregate { int first; char second; }; struct aggregate_const { const int first; const char second; }; @@ -66,5 +73,8 @@ int main() { aggregate_const_rref{std::move(first), std::move(second)}, std::tuple{std::move(first), std::move(second)} ); +#endif // #if BOOST_PFR_USE_CPP17 + + return boost::report_errors(); } From d4095b3fbded69bf7f3bbd6cd6eee082c7c116f1 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sun, 12 Feb 2023 19:46:27 +0300 Subject: [PATCH 3/4] update the generation script --- include/boost/pfr/detail/core17_generated.hpp | 4 +- misc/generate_cpp17.py | 63 ++++++++++++------- 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/include/boost/pfr/detail/core17_generated.hpp b/include/boost/pfr/detail/core17_generated.hpp index f54febbb..aa836f3b 100644 --- a/include/boost/pfr/detail/core17_generated.hpp +++ b/include/boost/pfr/detail/core17_generated.hpp @@ -73,7 +73,7 @@ constexpr decltype(auto) workaround_cast(Arg& arg) noexcept { } template -constexpr auto tie_as_tuple(T&& /*val*/, size_t_<0>) noexcept { +constexpr auto tie_as_tuple(const T& /*val*/, size_t_<0>) noexcept { return sequence_tuple::tuple<>{}; } @@ -86,7 +86,7 @@ constexpr auto tie_as_tuple(T&& val, size_t_<1>, std::enable_if_t constexpr auto tie_as_tuple(T&& val, size_t_<1>, std::enable_if_t >::value>* = nullptr) noexcept { - return ::boost::pfr::detail::make_tuple_of_references( val ); + return ::boost::pfr::detail::make_tuple_of_references( std::forward(val) ); } diff --git a/misc/generate_cpp17.py b/misc/generate_cpp17.py index 9013045f..899bdd7c 100644 --- a/misc/generate_cpp17.py +++ b/misc/generate_cpp17.py @@ -44,47 +44,66 @@ template constexpr auto make_tuple_of_references(Args&&... args) noexcept { - return sequence_tuple::tuple{ args... }; + return sequence_tuple::tuple{ static_cast(args)... }; } template constexpr decltype(auto) add_cv_like(Arg& arg) noexcept { - if constexpr (std::is_const::value && std::is_volatile::value) { - return const_cast(arg); - } - else if constexpr (std::is_const::value) { - return const_cast(arg); - } - else if constexpr (std::is_volatile::value) { - return const_cast(arg); - } - else { - return const_cast(arg); + if constexpr (std::is_rvalue_reference::value) { + if constexpr (std::is_const::value && std::is_volatile::value) { + return const_cast(arg); + } + else if constexpr (std::is_const::value) { + return const_cast(arg); + } + else if constexpr (std::is_volatile::value) { + return const_cast(arg); + } + else { + return const_cast(arg); + } + } else { + if constexpr (std::is_const::value && std::is_volatile::value) { + return const_cast(arg); + } + else if constexpr (std::is_const::value) { + return const_cast(arg); + } + else if constexpr (std::is_volatile::value) { + return const_cast(arg); + } + else { + return const_cast(arg); + } } } // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78939 template constexpr decltype(auto) workaround_cast(Arg& arg) noexcept { - using output_arg_t = std::conditional_t(), decltype(detail::add_cv_like(arg)), Sb>; + using output_arg_t = std::conditional_t< + !std::is_reference(), + decltype(detail::add_cv_like(arg)), + std::conditional_t::value, Sb&&, Sb&> + >; return const_cast(arg); } template -constexpr auto tie_as_tuple(T& /*val*/, size_t_<0>) noexcept { +constexpr auto tie_as_tuple(const T& /*val*/, size_t_<0>) noexcept { return sequence_tuple::tuple<>{}; } template -constexpr auto tie_as_tuple(T& val, size_t_<1>, std::enable_if_t >::value>* = nullptr) noexcept { - auto& [a] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. +constexpr auto tie_as_tuple(T&& val, size_t_<1>, std::enable_if_t >::value>* = nullptr) noexcept { + auto&& [a] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. return ::boost::pfr::detail::make_tuple_of_references(detail::workaround_cast(a)); } template -constexpr auto tie_as_tuple(T& val, size_t_<1>, std::enable_if_t >::value>* = nullptr) noexcept { - return ::boost::pfr::detail::make_tuple_of_references( val ); +constexpr auto tie_as_tuple(T&& val, size_t_<1>, std::enable_if_t >::value>* = nullptr) noexcept { + return ::boost::pfr::detail::make_tuple_of_references( std::forward(val) ); } """ @@ -92,7 +111,7 @@ ############################################################################################################################ EPILOGUE = """ template -constexpr void tie_as_tuple(T& /*val*/, size_t_) noexcept { +constexpr void tie_as_tuple(T&& /*val*/, size_t_) noexcept { static_assert(sizeof(T) && false, "====================> Boost.PFR: Too many fields in a structure T. Regenerate include/boost/pfr/detail/core17_generated.hpp file for appropriate count of fields. For example: `python ./misc/generate_cpp17.py 300 > include/boost/pfr/detail/core17_generated.hpp`"); } @@ -151,11 +170,11 @@ def print_once(self): empty_printer = EmptyLinePrinter() print("template ") - print("constexpr auto tie_as_tuple(T& val, size_t_<" + str(i + 1) + ">) noexcept {") + print("constexpr auto tie_as_tuple(T&& val, size_t_<" + str(i + 1) + ">) noexcept {") if i < max_args_on_a_line: - print(" auto& [" + indexes.strip() + "] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate.") + print(" auto&& [" + indexes.strip() + "] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate.") else: - print(" auto& [") + print(" auto&& [") print(indexes) print(" ] = const_cast&>(val); // ====================> Boost.PFR: User-provided type is not a SimpleAggregate.") empty_printer.print_once() From 442928eeb4effd64c655f5b67c757aa7ba24c5c5 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Tue, 14 Feb 2023 09:23:15 +0300 Subject: [PATCH 4/4] fixes --- test/core/run/tuple_types_match.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/test/core/run/tuple_types_match.cpp b/test/core/run/tuple_types_match.cpp index 4c56be08..b694f792 100644 --- a/test/core/run/tuple_types_match.cpp +++ b/test/core/run/tuple_types_match.cpp @@ -25,22 +25,22 @@ void test_get_matches_tuple(T x, U y) { BOOST_TEST_EQ(boost::pfr::get<0>(std::move(x)), std::get<0>(std::move(y))); BOOST_TEST_EQ(boost::pfr::get<1>(std::move(x)), std::get<1>(std::move(y))); - static_assert(std::is_same_v(x)), decltype(std::get<0>(y))>); - static_assert(std::is_same_v(x)), decltype(std::get<1>(y))>); + static_assert(std::is_same(x)), decltype(std::get<0>(y))>::value, ""); + static_assert(std::is_same(x)), decltype(std::get<1>(y))>::value, ""); - static_assert(std::is_same_v(x_cref)), decltype(std::get<0>(y_cref))>); - static_assert(std::is_same_v(x_cref)), decltype(std::get<1>(y_cref))>); + static_assert(std::is_same(x_cref)), decltype(std::get<0>(y_cref))>::value, ""); + static_assert(std::is_same(x_cref)), decltype(std::get<1>(y_cref))>::value, ""); - static_assert(std::is_same_v(std::move(x_cref))), decltype(std::get<0>(std::move(y_cref)))>); - static_assert(std::is_same_v(std::move(x_cref))), decltype(std::get<1>(std::move(y_cref)))>); - static_assert(std::is_same_v(std::move(x))), decltype(std::get<0>(std::move(y)))>); - static_assert(std::is_same_v(std::move(x))), decltype(std::get<1>(std::move(y)))>); + static_assert(std::is_same(std::move(x_cref))), decltype(std::get<0>(std::move(y_cref)))>::value, ""); + static_assert(std::is_same(std::move(x_cref))), decltype(std::get<1>(std::move(y_cref)))>::value, ""); + static_assert(std::is_same(std::move(x))), decltype(std::get<0>(std::move(y)))>::value, ""); + static_assert(std::is_same(std::move(x))), decltype(std::get<1>(std::move(y)))>::value, ""); - // TODO: tuple_element_t - //static_assert(std::is_same_v, std::tuple_element_t<0, U> >); - //static_assert(std::is_same_v, std::tuple_element_t<1, U> >); - //static_assert(std::is_same_v, std::tuple_element_t<0, const U> >); - //static_assert(std::is_same_v, std::tuple_element_t<1, const U> >); + // TODO: seems to take a lot of effort with close to 0 profit + //static_assert(std::is_same, std::tuple_element_t<0, U> >::value, ""); + //static_assert(std::is_same, std::tuple_element_t<1, U> >::value, ""); + //static_assert(std::is_same, std::tuple_element_t<0, const U> >::value, ""); + //static_assert(std::is_same, std::tuple_element_t<1, const U> >::value, ""); } int main() {