From 42c14df6819b706a966a4bc158f59ab15482f1f1 Mon Sep 17 00:00:00 2001 From: sha512sum Date: Sat, 29 Jun 2024 08:49:52 +0000 Subject: [PATCH] Remove FieldType from attributes --- examples/src/attributes.cpp | 6 +++--- include/utempl/attributes.hpp | 8 +------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/examples/src/attributes.cpp b/examples/src/attributes.cpp index 773e083..6eac821 100644 --- a/examples/src/attributes.cpp +++ b/examples/src/attributes.cpp @@ -29,9 +29,9 @@ static_assert(utempl::GetAttributes() struct SomeOtherStruct { static_assert(utempl::OpenStruct()); - utempl::FieldAttribute, int> field1; - utempl::FieldAttribute> field2; - utempl::FieldAttribute, void> field3; + utempl::FieldAttribute field1; + utempl::FieldAttribute field2; + utempl::FieldAttribute field3; static_assert(utempl::CloseStruct()); }; diff --git a/include/utempl/attributes.hpp b/include/utempl/attributes.hpp index ff27d63..ec0ae86 100644 --- a/include/utempl/attributes.hpp +++ b/include/utempl/attributes.hpp @@ -48,12 +48,6 @@ struct NoInfo { }; -template -struct FieldType { - using Type = T; -}; - - namespace impl { template @@ -74,7 +68,7 @@ template < typename Current = decltype(GetCurrentTagType())::Type, auto = AddTypeToTag, typename FieldAttributeData::Type, decltype(f)>() > -consteval auto FieldAttribute() -> T::Type; +consteval auto FieldAttribute() -> T; } // namespace impl