9#if !TOML_IMPLEMENTATION
10#error This is an implementation-only header.
24 node::node()
noexcept =
default;
27 node::~node()
noexcept =
default;
30 node::node(node && other)
noexcept
31 : source_{std::exchange(other.source_, {})} {}
34 node::node(
const node& )
noexcept {
41 node& node::operator=(
const node& )
noexcept {
51 node& node::operator=(node&& rhs)
noexcept {
52 if (&rhs !=
this) source_ = std::exchange(rhs.source_, {});
57 node_view<node> node::at_path(std::string_view
path)
noexcept {
58 return toml::at_path(*
this,
path);
62 node_view<const node> node::at_path(std::string_view
path)
const noexcept {
63 return toml::at_path(*
this,
path);
67 node_view<node> node::at_path(
const path& p)
noexcept {
68 return toml::at_path(*
this, p);
72 node_view<const node> node::at_path(
const path& p)
const noexcept {
73 return toml::at_path(*
this, p);
76#if TOML_ENABLE_WINDOWS_COMPAT
79 node_view<node> node::at_path(std::wstring_view
path) {
80 return toml::at_path(*
this,
path);
84 node_view<const node> node::at_path(std::wstring_view
path)
const {
85 return toml::at_path(*
this,
path);
91 node_view<node> node::operator[](
const path& p)
noexcept {
92 return toml::at_path(*
this, p);
96 node_view<const node> node::operator[](
const path& p)
const noexcept {
97 return toml::at_path(*
this, p);
105 bool TOML_CALLCONV node_deep_equality(
const node* lhs,
const node* rhs)
noexcept {
107 if (lhs == rhs)
return true;
110 if ((!lhs != !rhs) || lhs->type() != rhs->type())
return false;
112 return lhs->visit([=](
auto& l)
noexcept {
113 using concrete_type = remove_cvref<
decltype(l)>;
115 return l == *(rhs->as<concrete_type>());
A TOML path.
Definition path.hpp:239
#define TOML_CALLCONV
Calling convention to apply to exported free/static functions. \detail Not defined by default (let th...
Definition preprocessor.hpp:1134
TOML_NAMESPACE_START
Definition node.inl:22
TOML_IMPL_NAMESPACE_START
Definition node.inl:102
TOML_NAMESPACE_END
Definition node.inl:100
#define TOML_EXTERNAL_LINKAGE
Definition preprocessor.hpp:1339
#define TOML_PURE_GETTER
Definition preprocessor.hpp:474
#define TOML_IMPL_NAMESPACE_END
Definition preprocessor.hpp:1334