Files
libconfig/build-config/reflect-cpp/include/rfl/parsing/Parser_vector_like.hpp
Emily Boudreaux ec13264050 feat(reflect-cpp): Switched from glaze -> reflect cpp
A bug was discovered in glaze which prevented valid toml output. We have
switched to toml++ and reflect-cpp. The interface has remained the same
so this should not break any code
2025-12-06 10:55:46 -05:00

104 lines
4.1 KiB
C++

#ifndef RFL_PARSING_PARSER_VECTOR_LIKE_HPP_
#define RFL_PARSING_PARSER_VECTOR_LIKE_HPP_
#include <deque>
#include <forward_list>
#include <list>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "../Result.hpp"
#include "../always_false.hpp"
#include "Parser_base.hpp"
#include "VectorParser.hpp"
namespace rfl {
namespace parsing {
template <class R, class W, class T, class ProcessorsType>
requires AreReaderAndWriter<R, W, std::deque<T>>
struct Parser<R, W, std::deque<T>, ProcessorsType>
: public VectorParser<R, W, std::deque<T>, ProcessorsType> {};
template <class R, class W, class T, class ProcessorsType>
requires AreReaderAndWriter<R, W, std::forward_list<T>>
struct Parser<R, W, std::forward_list<T>, ProcessorsType>
: public VectorParser<R, W, std::forward_list<T>, ProcessorsType> {};
template <class R, class W, class T, class ProcessorsType>
requires AreReaderAndWriter<R, W, std::list<T>>
struct Parser<R, W, std::list<T>, ProcessorsType>
: public VectorParser<R, W, std::list<T>, ProcessorsType> {};
template <class R, class W, class K, class V, class ProcessorsType>
requires AreReaderAndWriter<R, W, std::map<K, V>>
struct Parser<R, W, std::map<K, V>, ProcessorsType>
: public VectorParser<R, W, std::map<K, V>, ProcessorsType> {};
template <class R, class W, class K, class V, class ProcessorsType>
requires AreReaderAndWriter<R, W, std::multimap<K, V>>
struct Parser<R, W, std::multimap<K, V>, ProcessorsType>
: public VectorParser<R, W, std::multimap<K, V>, ProcessorsType> {};
template <class R, class W, class T, class ProcessorsType>
requires AreReaderAndWriter<R, W, std::multiset<T>>
struct Parser<R, W, std::multiset<T>, ProcessorsType>
: public VectorParser<R, W, std::multiset<T>, ProcessorsType> {};
template <class R, class W, class T, class ProcessorsType>
requires AreReaderAndWriter<R, W, std::set<T>>
struct Parser<R, W, std::set<T>, ProcessorsType>
: public VectorParser<R, W, std::set<T>, ProcessorsType> {};
template <class R, class W, class K, class V, class Hash, class KeyEqual,
class Allocator, class ProcessorsType>
requires AreReaderAndWriter<
R, W, std::unordered_map<K, V, Hash, KeyEqual, Allocator>>
struct Parser<R, W, std::unordered_map<K, V, Hash, KeyEqual, Allocator>,
ProcessorsType>
: public VectorParser<R, W,
std::unordered_map<K, V, Hash, KeyEqual, Allocator>,
ProcessorsType> {};
template <class R, class W, class T, class Hash, class KeyEqual,
class Allocator, class ProcessorsType>
requires AreReaderAndWriter<
R, W, std::unordered_multiset<T, Hash, KeyEqual, Allocator>>
struct Parser<R, W, std::unordered_multiset<T, Hash, KeyEqual, Allocator>,
ProcessorsType>
: public VectorParser<R, W,
std::unordered_multiset<T, Hash, KeyEqual, Allocator>,
ProcessorsType> {};
template <class R, class W, class K, class V, class Hash, class KeyEqual,
class Allocator, class ProcessorsType>
requires AreReaderAndWriter<
R, W, std::unordered_multimap<K, V, Hash, KeyEqual, Allocator>>
struct Parser<R, W, std::unordered_multimap<K, V, Hash, KeyEqual, Allocator>,
ProcessorsType>
: public VectorParser<R, W, std::unordered_multimap<K, V>, ProcessorsType> {
};
template <class R, class W, class T, class Hash, class KeyEqual,
class Allocator, class ProcessorsType>
requires AreReaderAndWriter<R, W,
std::unordered_set<T, Hash, KeyEqual, Allocator>>
struct Parser<R, W, std::unordered_set<T, Hash, KeyEqual, Allocator>,
ProcessorsType>
: public VectorParser<R, W,
std::unordered_set<T, Hash, KeyEqual, Allocator>,
ProcessorsType> {};
template <class R, class W, class T, class ProcessorsType>
requires AreReaderAndWriter<R, W, std::vector<T>>
struct Parser<R, W, std::vector<T>, ProcessorsType>
: public VectorParser<R, W, std::vector<T>, ProcessorsType> {};
} // namespace parsing
} // namespace rfl
#endif