ezconfig
Create C++ Objects from Yaml and Json
Loading...
Searching...
No Matches
hana_fwd.hpp
1// Copyright (c) 2023 Petter Nilsson. MIT License. https://github.com/pettni/ezconfig
2
3#pragma once
4
5#include <variant>
6
7#include <boost/hana/concept/struct.hpp>
8
9namespace ezconfig {
10
34template<typename T>
36{};
37
38} // namespace ezconfig
39
40namespace YAML {
41
42// forward declarations
43template<typename T>
44struct convert;
45
46class Node;
47
51template<typename T>
52 requires(boost::hana::Struct<T>::value)
54{
55 static bool decode(const Node & yaml, T & t);
56};
57
64template<typename... Ts>
65struct convert<std::variant<Ts...>>
66{
67 static bool decode(const Node & yaml, std::variant<Ts...> & obj);
68};
69
70} // namespace YAML
YAML forward declarations.
Definition yaml_fwd.hpp:16
Type trait for std::variant<> yaml decoding.
Definition hana_fwd.hpp:36