better fields
This commit is contained in:
@@ -71,10 +71,15 @@ struct FieldsBuilder<> {
|
||||
using Type = std::tuple<>;
|
||||
};
|
||||
|
||||
template<typename... TFields>
|
||||
struct FieldsBuilder<std::tuple<TFields...>> {
|
||||
using Type = typename FieldsBuilder<TFields...>::Type;
|
||||
};
|
||||
|
||||
|
||||
template <typename TField, typename... TFields>
|
||||
struct FieldsBuilder<TField, TFields...> {
|
||||
using Type = sp::tuple_cat_t<std::tuple<Field<TField>>, typename FieldsBuilder<TFields...>::Type>;
|
||||
};
|
||||
|
||||
|
||||
} // namespace sp
|
||||
|
||||
@@ -54,7 +54,7 @@ struct MessageImplParsedOptions<option::DispatchImpl<TActual>, TOptions...> : pu
|
||||
template <typename TFields, typename... TOptions>
|
||||
struct MessageImplParsedOptions<option::FieldsImpl<TFields>, TOptions...> : public MessageImplParsedOptions<TOptions...> {
|
||||
static const bool HasFieldsImpl = true;
|
||||
using Fields = TFields;
|
||||
using Fields = typename FieldsBuilder<TFields>::Type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user