#ifndef RFL_PARSING_SCHEMAFUL_OPTIONALREADER_HPP_ #define RFL_PARSING_SCHEMAFUL_OPTIONALREADER_HPP_ #include #include #include "../../Result.hpp" #include "../Parser_base.hpp" namespace rfl::parsing::schemaful { template struct OptionalReader { static Result> read( const R& _r, const size_t _index, const typename R::InputVarType& _var) noexcept { if (_index == 1) { return std::optional(); } return Parser, ProcessorsType>::read(_r, _var); } }; } // namespace rfl::parsing::schemaful #endif