#include "preprocessor.hpp"
#include "at_path.hpp"
#include "path.hpp"
#include "print_to_stream.hpp"
#include <sstream>
#include "header_start.hpp"
#include "header_end.hpp"
Go to the source code of this file.
◆ TOML_ANON_NAMESPACE_START
| TOML_ANON_NAMESPACE_START |
Initial value:{
bool parse_path_into(std::string_view path_str, std::vector<path_component> & components) {
using components_type = std::remove_reference_t<decltype(components)>;
const auto original_size = components.size();
static constexpr auto on_key = [](
void*
data, std::string_view key) ->
bool {
auto& comps = *
static_cast<components_type*
>(
data);
comps.emplace_back(key);
return true;
};
static constexpr auto on_index = [](
void*
data,
size_t index) ->
bool {
auto& comps = *
static_cast<components_type*
>(
data);
comps.emplace_back(
index);
return true;
};
if (!impl::parse_path(path_str, &components, on_key, on_index)) {
components.resize(original_size);
return false;
}
return true;
}
}
#define TOML_ANON_NAMESPACE_END
#define TOML_INTERNAL_LINKAGE
Definition at line 170 of file path.inl.
◆ TOML_DISABLE_WARNINGS
◆ TOML_ENABLE_WARNINGS
◆ TOML_NAMESPACE_START