source_region struct
A source document region.
Contents
- Reference
#include <fstream> auto tbl = toml::parse_file("config.toml"sv); if (auto server = tbl.get("server")) { std::cout << "begin: "sv << server->source().begin << std::endl; std::cout << "end: "sv << server->source().end << std::endl; std::cout << "path: "sv << *server->source().path << std::endl; }
begin: line 3, column 1 end: line 3, column 22 path: config.toml
Public functions
- auto wide_path() const -> optional<std::wstring> noexcept
- The path to the corresponding source document as a wide-string.
Public variables
-
source_
position begin - The beginning of the region (inclusive).
-
source_
position end - The end of the region (exclusive).
-
source_
path_ ptr path - The path to the corresponding source document.
Function documentation
optional<std::wstring> toml:: source_region:: wide_path() const noexcept
The path to the corresponding source document as a wide-string.
Variable documentation
source_ path_ ptr toml:: source_region:: path
The path to the corresponding source document.