diff options
-rw-r--r-- | modules/codec-json/c++/json.tmpl.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/codec-json/c++/json.tmpl.hpp b/modules/codec-json/c++/json.tmpl.hpp index be6d80d..4c6b2f0 100644 --- a/modules/codec-json/c++/json.tmpl.hpp +++ b/modules/codec-json/c++/json.tmpl.hpp @@ -265,7 +265,7 @@ template<typename T, size_t... D, typename FromEncode> struct json_encode<schema::FixedArray<T,D...>, FromEncode> { using Schema = schema::FixedArray<T,D...>; - static error_or<void> encode_at(const data<Schema, FromEncode>& from, buffer& to, data<schema::FixedArray<schema::UInt64,sizeof(D...)>, FromEncode>& index, uint64_t depth, bool pretty){ + static error_or<void> encode_at(const data<Schema, FromEncode>& from, buffer& to, data<schema::FixedArray<schema::UInt64,sizeof...(D)>, FromEncode>& index, uint64_t depth, bool pretty){ auto eov = json_encode<T, FromEncode>::encode(from.at(index), to, depth, pretty); if(eov.is_error()){ return eov; @@ -274,7 +274,7 @@ struct json_encode<schema::FixedArray<T,D...>, FromEncode> { } template<size_t Level, size_t Dim, size_t... DimPack> - static error_or<void> encode_level(const data<Schema, FromEncode>& from, buffer& to, data<schema::FixedArray<schema::UInt64,sizeof(D...)>, FromEncode>& index, uint64_t depth, bool pretty){ + static error_or<void> encode_level(const data<Schema, FromEncode>& from, buffer& to, data<schema::FixedArray<schema::UInt64,sizeof...(D)>, FromEncode>& index, uint64_t depth, bool pretty){ { auto err = to.push('['); if(!err.template is_type<err::no_error>()){ @@ -314,7 +314,7 @@ struct json_encode<schema::FixedArray<T,D...>, FromEncode> { static error_or<void> encode(const data<Schema, FromEncode>& from, buffer& to, uint64_t depth, bool pretty) { if constexpr (sizeof...(D) > 0){ - data<schema::FixedArray<schema::UInt64,sizeof(D...)>, FromEncode> index; + data<schema::FixedArray<schema::UInt64,sizeof...(D)>, FromEncode> index; return encode_level<0,D...>(from, to, index, depth+1u, pretty); } return void_t{}; |