#ifndef RFL_PARSING_PARSER_C_ARRAY_HPP_ #define RFL_PARSING_PARSER_C_ARRAY_HPP_ #include #include "../Result.hpp" #include "../always_false.hpp" #include "Parser_base.hpp" namespace rfl { namespace parsing { template requires AreReaderAndWriter struct Parser { public: using InputArrayType = typename R::InputArrayType; using InputVarType = typename R::InputVarType; using OutputArrayType = typename W::OutputArrayType; using OutputVarType = typename W::OutputVarType; using CArray = T[_size]; static Result read(const R& _r, const InputVarType& _var) noexcept { static_assert(always_false_v, "Unimplemented"); } static OutputVarType write(const W& _w, const CArray& _arr) noexcept { auto arr = _w.new_array(); for (const auto& e : _arr) { _w.add(Parser>::write(_w, e), &arr); } return OutputVarType(arr); } }; } // namespace parsing } // namespace rfl #endif