Remove FieldType from attributes

This commit is contained in:
sha512sum 2024-06-29 08:49:52 +00:00
parent af067d0db4
commit 42c14df681
2 changed files with 4 additions and 10 deletions

View file

@ -29,9 +29,9 @@ static_assert(utempl::GetAttributes<SomeStruct>()
struct SomeOtherStruct {
static_assert(utempl::OpenStruct<SomeOtherStruct>());
utempl::FieldAttribute<utempl::FieldType<int>, int> field1;
utempl::FieldAttribute<utempl::FieldType<int>> field2;
utempl::FieldAttribute<utempl::FieldType<std::string>, void> field3;
utempl::FieldAttribute<int, int> field1;
utempl::FieldAttribute<int> field2;
utempl::FieldAttribute<std::string, void> field3;
static_assert(utempl::CloseStruct());
};

View file

@ -48,12 +48,6 @@ struct NoInfo {
};
template <typename T>
struct FieldType {
using Type = T;
};
namespace impl {
template <typename... Ts>
@ -74,7 +68,7 @@ template <
typename Current = decltype(GetCurrentTagType<impl::AttributesTag, decltype(f)>())::Type,
auto = AddTypeToTag<impl::AttributesCounterTag<Current>, typename FieldAttributeData<Ts...>::Type, decltype(f)>()
>
consteval auto FieldAttribute() -> T::Type;
consteval auto FieldAttribute() -> T;
} // namespace impl