You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
static_assert(!sizeof(T), "====================> Boost.PFR: Calling boost::pfr::get on non const non assignable type is allowed only in C++17");
82
+
static_assert(sizeof(T) && false, "====================> Boost.PFR: Calling boost::pfr::get on non const non assignable type is allowed only in C++17 and later");
static_assert(!sizeof(T), "====================> Boost.PFR: Calling boost::pfr::get on non const non assignable type is allowed only in C++17");
121
+
static_assert(sizeof(T) && false, "====================> Boost.PFR: Calling boost::pfr::get on non const non assignable type is allowed only in C++17 and later");
103
122
return0;
104
123
}
105
124
#endif
@@ -143,10 +162,15 @@ using tuple_element_t = typename tuple_element<I, T>::type;
143
162
/// \endcode
144
163
template <classT>
145
164
constexprautostructure_to_tuple(const T& val) {
165
+
#if BOOST_PFR_USE_CPP26
166
+
constauto& [... members] = val;
167
+
returnstd::make_tuple(members...);
168
+
#else
146
169
returndetail::make_stdtuple_from_tietuple(
147
170
detail::tie_as_tuple(val),
148
171
detail::make_index_sequence< tuple_size_v<T> >()
149
172
);
173
+
#endif
150
174
}
151
175
152
176
@@ -168,31 +192,39 @@ constexpr auto structure_to_tuple(const T& val) {
static_assert(!sizeof(T), "====================> Boost.PFR: Calling boost::pfr::structure_tie on non const non assignable type is allowed only in C++17");
227
+
static_assert(sizeof(T) && false, "====================> Boost.PFR: Calling boost::pfr::structure_tie on non const non assignable type is allowed only in C++17 and later modes");
196
228
return0;
197
229
}
198
230
#endif
@@ -201,7 +233,7 @@ constexpr auto structure_tie(T&, std::enable_if_t<!std::is_assignable<T, T>::val
0 commit comments