diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-06-07 15:33:51 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-06-07 15:33:51 +0200 |
commit | c6549eddb59d7d044f70f7f7973ac8b5480ae761 (patch) | |
tree | fe0d9654dc879932c38365b7bef7c94121f50a22 | |
parent | fd08cbce6fd9ec1a3b0fdeedbcbf667cd0f89ce4 (diff) |
Added class struct impl base for Json FixedArray decoding.
Not implemented yet, but shouldn't cause compilation errors either
-rw-r--r-- | modules/codec-json/c++/json.tmpl.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/codec-json/c++/json.tmpl.hpp b/modules/codec-json/c++/json.tmpl.hpp index a6d4a20..956393f 100644 --- a/modules/codec-json/c++/json.tmpl.hpp +++ b/modules/codec-json/c++/json.tmpl.hpp @@ -874,7 +874,7 @@ struct json_decode<schema::Tuple<T...>, ToDecode> { } }; -// The whole std::vector approach is hacky af. ToDo change it maybe? +// The whole std::vector approach is hacky af. TODO change it maybe? template<typename T, size_t D, typename ToDecode> struct json_decode<schema::Array<T,D>, ToDecode> { using Schema = schema::Array<T,D>; @@ -979,5 +979,15 @@ struct json_decode<schema::Array<T,D>, ToDecode> { return decode_unflat_level<0>(flat_array, to, index, flat_index); } }; + +template<typename T, uint64_t... Dim, typename ToDecode> +struct json_decode<schema::FixedArray<T,Dim...>, ToDecode> { + using Schema = schema::FixedArray<T,Dim...>; + + static error_or<void> decode(buffer_view& buff, data<Schema, ToDecode>& to){ + + return make_error<err::not_implemented>("Json FixedArray decoding not implemented."); + } +}; } } |