Fix FieldSetHelpers for const objects

This commit is contained in:
sha512sum 2024-08-31 18:09:04 +00:00
parent a384eeb524
commit 3f04552491

View file

@ -163,7 +163,7 @@ struct FieldSetHelper {
}())>
static constexpr auto With(Self&& self, Value&& value) -> Type
requires(
std::is_aggregate_v<Type> && (std::same_as<T, void> || requires { static_cast<T&>(self); }) &&
std::is_aggregate_v<Type> && (std::same_as<T, void> || requires { static_cast<const T&>(self); }) &&
[] {
if constexpr(I < boost::pfr::tuple_size_v<Type>) {
return std::is_constructible_v<std::decay_t<decltype(boost::pfr::get<I>(std::declval<TT>()))>, decltype(value)>;