diff options
Diffstat (limited to 'modules/codec/c++/schema_hash.hpp')
-rw-r--r-- | modules/codec/c++/schema_hash.hpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/codec/c++/schema_hash.hpp b/modules/codec/c++/schema_hash.hpp index 5e44497..4b537e1 100644 --- a/modules/codec/c++/schema_hash.hpp +++ b/modules/codec/c++/schema_hash.hpp @@ -137,19 +137,17 @@ struct schema_hash_seed<schema::Member<V,K>> { } }; -template<typename... V, string_literal... K> -struct schema_hash_seed<schema::Struct<schema::Member<V,K>...>> { - using Schema = schema::Struct<schema::Member<V,K>...>; +template<typename... Members> +struct schema_hash_seed<schema::Struct<Members...>> { + using Schema = schema::Struct<Members...>; template<uint64_t i> static constexpr uint32_t apply_ele(uint32_t seed){ - using Type = typename parameter_pack_type<i,V...>::type; - constexpr string_literal Lit = parameter_key_pack_type<i,K...>::literal; - using MemberT = typename parameter_pack_type<i,schema::Member<V,K>...>::type; + using MemberT = typename parameter_pack_type<i,Members...>::type; seed = schema_hash_seed<MemberT>::apply(seed); - if constexpr ( (i+1) < sizeof...(V) ){ + if constexpr ( (i+1) < sizeof...(Members) ){ return apply_ele<i+1>(seed); } return seed; @@ -157,7 +155,7 @@ struct schema_hash_seed<schema::Struct<schema::Member<V,K>...>> { static constexpr uint32_t apply(uint32_t seed){ seed = hash_literal<Schema::name>::apply(seed); - if constexpr (sizeof...(V) > 0){ + if constexpr (sizeof...(Members) > 0){ seed = apply_ele<0>(seed); } return seed; |