ezconfig
Create C++ Objects from Yaml and Json
Loading...
Searching...
No Matches
include
ezconfig
yaml_types
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
9
namespace
ezconfig {
10
34
template
<
typename
T>
35
struct
variant_hana_maps
36
{};
37
38
}
// namespace ezconfig
39
40
namespace
YAML
{
41
42
// forward declarations
43
template
<
typename
T>
44
struct
convert;
45
46
class
Node;
47
51
template
<
typename
T>
52
requires
(boost::hana::Struct<T>::value)
53
struct
convert<T>
54
{
55
static
bool
decode(
const
Node & yaml, T & t);
56
};
57
64
template
<
typename
... Ts>
65
struct
convert
<std::variant<Ts...>>
66
{
67
static
bool
decode(
const
Node & yaml, std::variant<Ts...> & obj);
68
};
69
70
}
// namespace YAML
YAML
YAML forward declarations.
Definition
yaml_fwd.hpp:16
YAML::convert
Definition
stl_fwd.hpp:18
ezconfig::variant_hana_maps
Type trait for std::variant<> yaml decoding.
Definition
hana_fwd.hpp:36
Generated by
1.12.0