aboutsummaryrefslogtreecommitdiff
path: root/thirdparty/ryml/src/c4/yml/std/map.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/ryml/src/c4/yml/std/map.hpp')
-rw-r--r--thirdparty/ryml/src/c4/yml/std/map.hpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/thirdparty/ryml/src/c4/yml/std/map.hpp b/thirdparty/ryml/src/c4/yml/std/map.hpp
deleted file mode 100644
index fc48dc5e6..000000000
--- a/thirdparty/ryml/src/c4/yml/std/map.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef _C4_YML_STD_MAP_HPP_
-#define _C4_YML_STD_MAP_HPP_
-
-/** @file map.hpp write/read std::map to/from a YAML tree. */
-
-#include "c4/yml/node.hpp"
-#include <map>
-
-namespace c4 {
-namespace yml {
-
-// std::map requires child nodes in the data
-// tree hierarchy (a MAP node in ryml parlance).
-// So it should be serialized via write()/read().
-
-template<class K, class V, class Less, class Alloc>
-void write(c4::yml::NodeRef *n, std::map<K, V, Less, Alloc> const& m)
-{
- *n |= c4::yml::MAP;
- for(auto const& C4_RESTRICT p : m)
- {
- auto ch = n->append_child();
- ch << c4::yml::key(p.first);
- ch << p.second;
- }
-}
-
-template<class K, class V, class Less, class Alloc>
-bool read(c4::yml::ConstNodeRef const& n, std::map<K, V, Less, Alloc> * m)
-{
- K k{};
- V v{};
- for(auto const& C4_RESTRICT ch : n)
- {
- ch >> c4::yml::key(k);
- ch >> v;
- m->emplace(std::make_pair(std::move(k), std::move(v)));
- }
- return true;
-}
-
-} // namespace yml
-} // namespace c4
-
-#endif // _C4_YML_STD_MAP_HPP_