summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-06-13 14:59:35 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-06-13 14:59:35 +0200
commitc2c2b0448e484e15277f0ce30eff2d6b942a4f9e (patch)
tree7270834fdf2c374d9551f63a3dfe207aeb5c20b2 /modules
parent117891374340a8b53de0560bc399ad4c7b98ffd9 (diff)
Fixed expansion
Diffstat (limited to 'modules')
-rw-r--r--modules/codec-json/c++/json.tmpl.hpp6
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{};