mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-03 00:26:19 +08:00
34 lines
822 B
C++
34 lines
822 B
C++
#ifndef RFL_PARSING_PARSER_MAP_LIKE_HPP_
|
|
#define RFL_PARSING_PARSER_MAP_LIKE_HPP_
|
|
|
|
#include <map>
|
|
#include <stdexcept>
|
|
#include <string>
|
|
#include <type_traits>
|
|
#include <unordered_map>
|
|
|
|
#include "../Result.hpp"
|
|
#include "../always_false.hpp"
|
|
#include "MapParser.hpp"
|
|
#include "Parser_base.hpp"
|
|
|
|
namespace rfl {
|
|
namespace parsing {
|
|
|
|
template <class R, class W, class T>
|
|
requires AreReaderAndWriter<R, W, std::map<std::string, T>>
|
|
struct Parser<R, W, std::map<std::string, T>>
|
|
: public MapParser<R, W, std::map<std::string, T>> {
|
|
};
|
|
|
|
template <class R, class W, class T>
|
|
requires AreReaderAndWriter<R, W, std::unordered_map<std::string, T>>
|
|
struct Parser<R, W, std::unordered_map<std::string, T>>
|
|
: public MapParser<R, W, std::unordered_map<std::string, T>> {
|
|
};
|
|
|
|
} // namespace parsing
|
|
} // namespace rfl
|
|
|
|
#endif
|