Files
toml11/docs/reference/index.html
ToruNiina 360850a8c8 Merge pull request #295 from franzpoeschel/undef-source-location
Add a way to optionally suppress usage of std::source_location b96acf96ba
2025-12-03 15:01:09 +00:00

64 lines
15 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="
Reference
#
Here, we explain the effects of the classes and functions provided by toml11.
Directory Structure
#
toml.hpp and toml_fwd.hpp reside in ${TOML11_INCLUDE_DIR}.
Other files are located in ${TOML11_INCLUDE_DIR}/toml11.
If you want to #include each feature&rsquo;s file individually, use #include <toml11/color.hpp>.
If you want to include all at once, use #include <toml.hpp>.
color.hpp
#
Defines functions related to colorizing error messages.
comments.hpp
#
Defines types preserve_comment and discard_comment for preserving comments."><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#343a40"><meta name=color-scheme content="light dark"><meta property="og:url" content="https://toruniina.github.io/toml11/docs/reference/"><meta property="og:site_name" content="toml11"><meta property="og:title" content="reference"><meta property="og:description" content="Reference # Here, we explain the effects of the classes and functions provided by toml11.
Directory Structure # toml.hpp and toml_fwd.hpp reside in ${TOML11_INCLUDE_DIR}. Other files are located in ${TOML11_INCLUDE_DIR}/toml11.
If you want to #include each features file individually, use #include <toml11/color.hpp>. If you want to include all at once, use #include <toml.hpp>.
color.hpp # Defines functions related to colorizing error messages.
comments.hpp # Defines types preserve_comment and discard_comment for preserving comments."><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>reference | toml11</title><link rel=manifest href=/toml11/manifest.json><link rel=icon href=/toml11/favicon.png><link rel=canonical href=https://toruniina.github.io/toml11/docs/reference/><link rel=alternate hreflang=ja href=https://toruniina.github.io/toml11/ja/docs/reference/ title=reference><link rel=stylesheet href=/toml11/book.min.6d8037b375fe949eee1b70501c5fb9478914c9c5eb3ef7696163fd3031c69421.css integrity="sha256-bYA3s3X+lJ7uG3BQHF+5R4kUycXrPvdpYWP9MDHGlCE=" crossorigin=anonymous><script defer src=/toml11/fuse.min.js></script><script defer src=/toml11/en.search.min.87bec23503963d7026bfa3a917b92707789d315c9c9e005e23226b35dce643f5.js integrity="sha256-h77CNQOWPXAmv6OpF7knB3idMVycngBeIyJrNdzmQ/U=" crossorigin=anonymous></script><link rel=alternate type=application/rss+xml href=https://toruniina.github.io/toml11/docs/reference/index.xml title=toml11></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/toml11/><span>toml11</span></a></h2><div class="book-search hidden"><input type=text id=book-search-input placeholder=Search aria-label=Search maxlength=64 data-hotkeys=s/><div class="book-search-spinner hidden"></div><ul id=book-search-results></ul></div><script>document.querySelector(".book-search").classList.remove("hidden")</script><ul class=book-languages><li><input type=checkbox id=languages class=toggle>
<label for=languages class="flex justify-between"><a role=button class="flex align-center"><img src=/toml11/svg/translate.svg class=book-icon alt=Languages>
English</a></label><ul><li><a href=https://toruniina.github.io/toml11/ja/docs/reference/>日本語</a></li></ul></li></ul><ul><li><a href=/toml11/docs/installation/>installation</a><ul></ul></li><li><input type=checkbox id=section-291123c850af98d8b815ccdbb4c33657 class=toggle>
<label for=section-291123c850af98d8b815ccdbb4c33657 class="flex justify-between"><a href=/toml11/docs/features/>features</a></label><ul><li><a href=/toml11/docs/features/parsing_files/>parsing files</a></li><li><a href=/toml11/docs/features/value/>getting values</a></li><li><a href=/toml11/docs/features/error_message/>error message</a></li><li><a href=/toml11/docs/features/serialize/>serializing values</a></li><li><a href=/toml11/docs/features/configure_types/>configuring types</a></li><li><a href=/toml11/docs/features/literal/>toml literal</a></li><li><a href=/toml11/docs/features/toml_spec/>toml spec</a></li><li><a href=/toml11/docs/features/extension/>extension</a></li></ul></li><li><input type=checkbox id=section-e2e812e55021b82e114feaae98f1a02e class=toggle checked>
<label for=section-e2e812e55021b82e114feaae98f1a02e class="flex justify-between"><a href=/toml11/docs/reference/ class=active>reference</a></label><ul><li><a href=/toml11/docs/reference/color/>color.hpp</a></li><li><a href=/toml11/docs/reference/comments/>comments.hpp</a></li><li><a href=/toml11/docs/reference/conversion/>conversion.hpp</a></li><li><a href=/toml11/docs/reference/datetime/>datetime.hpp</a></li><li><a href=/toml11/docs/reference/error_info/>error_info.hpp</a></li><li><a href=/toml11/docs/reference/exception/>exception.hpp</a></li><li><a href=/toml11/docs/reference/find/>find.hpp</a></li><li><a href=/toml11/docs/reference/format/>format.hpp</a></li><li><a href=/toml11/docs/reference/from/>from.hpp</a></li><li><a href=/toml11/docs/reference/get/>get.hpp</a></li><li><a href=/toml11/docs/reference/into/>into.hpp</a></li><li><a href=/toml11/docs/reference/literal/>literal.hpp</a></li><li><a href=/toml11/docs/reference/ordered_map/>ordered_map.hpp</a></li><li><a href=/toml11/docs/reference/parser/>parser.hpp</a></li><li><a href=/toml11/docs/reference/result/>result.hpp</a></li><li><a href=/toml11/docs/reference/serializer/>serializer.hpp</a></li><li><a href=/toml11/docs/reference/source_location/>source_location.hpp</a></li><li><a href=/toml11/docs/reference/spec/>spec.hpp</a></li><li><a href=/toml11/docs/reference/toml_fwd/>toml_fwd.hpp</a></li><li><a href=/toml11/docs/reference/toml/>toml.hpp</a></li><li><a href=/toml11/docs/reference/types/>types.hpp</a></li><li><a href=/toml11/docs/reference/value_t/>value_t.hpp</a></li><li><a href=/toml11/docs/reference/value/>value.hpp</a></li><li><a href=/toml11/docs/reference/version/>version.hpp</a></li><li><a href=/toml11/docs/reference/visit/>visit.hpp</a></li></ul></li><li><a href=/toml11/docs/changelog/>changelog</a><ul></ul></li></ul><ul><li><a href=https://github.com/ToruNiina/toml11 target=_blank rel=noopener>GitHub</a></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/toml11/svg/menu.svg class=book-icon alt=Menu>
</label><strong>reference</strong>
<label for=toc-control><img src=/toml11/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#reference>Reference</a><ul><li><a href=#directory-structure>Directory Structure</a></li><li><a href=#colorhpp>color.hpp</a></li><li><a href=#commentshpp>comments.hpp</a></li><li><a href=#conversionhpp>conversion.hpp</a></li><li><a href=#datetimehpp>datetime.hpp</a></li><li><a href=#error_>error_info.hpp</a></li><li><a href=#exceptionhpp>exception.hpp</a></li><li><a href=#findhpp>find.hpp</a></li><li><a href=#formathpp>format.hpp</a></li><li><a href=#fromhpp>from.hpp</a></li><li><a href=#gethpp>get.hpp</a></li><li><a href=#intohpp>into.hpp</a></li><li><a href=#literalhpp>literal.hpp</a></li><li><a href=#ordered_>ordered_map.hpp</a></li><li><a href=#parserhpp>parser.hpp</a></li><li><a href=#resulthpp>result.hpp</a></li><li><a href=#serializerhpp>serializer.hpp</a></li><li><a href=#source_>source_location.hpp</a></li><li><a href=#spechpp>spec.hpp</a></li><li><a href=#tomlhpp>toml.hpp</a></li><li><a href=#toml_>toml_fwd.hpp</a></li><li><a href=#typeshpp>types.hpp</a></li><li><a href=#valuehpp>value.hpp</a></li><li><a href=#value_>value_t.hpp</a></li><li><a href=#versionhpp>version.hpp</a></li><li><a href=#visithpp>visit.hpp</a></li><li><a href=#notes>Notes</a></li></ul></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=reference>Reference
<a class=anchor href=#reference>#</a></h1><p>Here, we explain the effects of the classes and functions provided by toml11.</p><h2 id=directory-structure>Directory Structure
<a class=anchor href=#directory-structure>#</a></h2><p><code>toml.hpp</code> and <code>toml_fwd.hpp</code> reside in <code>${TOML11_INCLUDE_DIR}</code>.
Other files are located in <code>${TOML11_INCLUDE_DIR}/toml11</code>.</p><p>If you want to <code>#include</code> each feature&rsquo;s file individually, use <code>#include &lt;toml11/color.hpp></code>.
If you want to include all at once, use <code>#include &lt;toml.hpp></code>.</p><h2 id=colorhpp><a href=color>color.hpp</a>
<a class=anchor href=#colorhpp>#</a></h2><p>Defines functions related to colorizing error messages.</p><h2 id=commentshpp><a href=comments>comments.hpp</a>
<a class=anchor href=#commentshpp>#</a></h2><p>Defines types <code>preserve_comment</code> and <code>discard_comment</code> for preserving comments.</p><h2 id=conversionhpp><a href=conversion>conversion.hpp</a>
<a class=anchor href=#conversionhpp>#</a></h2><p>Defines macros to automatically convert <code>toml::value</code> and user-defined classes.</p><h2 id=datetimehpp><a href=datetime>datetime.hpp</a>
<a class=anchor href=#datetimehpp>#</a></h2><p>Defines classes for datetime information.</p><h2 id=error_><a href=error_info>error_info.hpp</a>
<a class=anchor href=#error_>#</a></h2><p>Defines a class for error information.</p><h2 id=exceptionhpp><a href=exception>exception.hpp</a>
<a class=anchor href=#exceptionhpp>#</a></h2><p>Defines the base class for exceptions used in toml11, <code>toml::exception</code>.</p><h2 id=findhpp><a href=find>find.hpp</a>
<a class=anchor href=#findhpp>#</a></h2><p>Defines the <code>toml::find</code> function to search for and convert values.</p><h2 id=formathpp><a href=format>format.hpp</a>
<a class=anchor href=#formathpp>#</a></h2><p>Defines classes for formatting information of values.</p><h2 id=fromhpp><a href=from>from.hpp</a>
<a class=anchor href=#fromhpp>#</a></h2><p>Forward declaration of the <code>from&lt;T></code> type for converting user-defined types.</p><h2 id=gethpp><a href=get>get.hpp</a>
<a class=anchor href=#gethpp>#</a></h2><p>Defines the <code>toml::get&lt;T></code> function to retrieve and convert values from <code>toml::value</code>.</p><h2 id=intohpp><a href=into>into.hpp</a>
<a class=anchor href=#intohpp>#</a></h2><p>Forward declaration of the <code>into&lt;T></code> type for converting user-defined types.</p><h2 id=literalhpp><a href=literal>literal.hpp</a>
<a class=anchor href=#literalhpp>#</a></h2><p>Defines the <code>operator"" _toml</code> literal.</p><h2 id=ordered_><a href=ordered_map>ordered_map.hpp</a>
<a class=anchor href=#ordered_>#</a></h2><p>Defines <code>toml::ordered_map</code>.</p><h2 id=parserhpp><a href=parser>parser.hpp</a>
<a class=anchor href=#parserhpp>#</a></h2><p>Defines functions to parse files or strings.</p><h2 id=resulthpp><a href=result>result.hpp</a>
<a class=anchor href=#resulthpp>#</a></h2><p>Defines the <code>result&lt;T, E></code> type for representing success or failure values used as return types in other functions.</p><h2 id=serializerhpp><a href=serializer>serializer.hpp</a>
<a class=anchor href=#serializerhpp>#</a></h2><p>Defines the <code>toml::format</code> function and <code>toml::serializer</code> used for serialization.</p><h2 id=source_><a href=source_location>source_location.hpp</a>
<a class=anchor href=#source_>#</a></h2><p>Defines the <code>source_location</code> type used for error information, pointing to a location within a file.</p><h2 id=spechpp><a href=spec>spec.hpp</a>
<a class=anchor href=#spechpp>#</a></h2><p>Defines the <code>toml::semantic_version</code> and <code>toml::spec</code> types to control TOML language version information and feature flags.</p><h2 id=tomlhpp><a href=toml>toml.hpp</a>
<a class=anchor href=#tomlhpp>#</a></h2><p><code>toml.hpp</code> includes all other headers, making all toml11 features available.</p><h2 id=toml_><a href=toml_fwd>toml_fwd.hpp</a>
<a class=anchor href=#toml_>#</a></h2><p><code>toml_fwd.hpp</code> contains forward declarations of structs defined in toml11 and macro definitions.</p><h2 id=typeshpp><a href=types>types.hpp</a>
<a class=anchor href=#typeshpp>#</a></h2><p>Defines the <code>toml::type_config</code> type for controlling the types held by <code>toml::value</code>.</p><h2 id=valuehpp><a href=value>value.hpp</a>
<a class=anchor href=#valuehpp>#</a></h2><p>Defines the <code>toml::value</code> type.</p><h2 id=value_><a href=value_t>value_t.hpp</a>
<a class=anchor href=#value_>#</a></h2><p>Defines the <code>toml::value_t</code> enumeration.</p><h2 id=versionhpp><a href=version>version.hpp</a>
<a class=anchor href=#versionhpp>#</a></h2><p>Defines the version information for toml11.</p><h2 id=visithpp><a href=visit>visit.hpp</a>
<a class=anchor href=#visithpp>#</a></h2><p>Defines the <code>toml::visit</code> function to apply functions to the values held by <code>toml::value</code>.</p><h2 id=notes>Notes
<a class=anchor href=#notes>#</a></h2><p>Functions not explicitly mentioned here (mostly those defined under <code>namespace toml::detail</code> or <code>namespace toml::cxx</code>) are available by inspecting the source code but are not guaranteed to maintain their interface across future versions (including patch version updates).</p></article><footer class=book-footer><div class="flex flex-wrap justify-between"></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#reference>Reference</a><ul><li><a href=#directory-structure>Directory Structure</a></li><li><a href=#colorhpp>color.hpp</a></li><li><a href=#commentshpp>comments.hpp</a></li><li><a href=#conversionhpp>conversion.hpp</a></li><li><a href=#datetimehpp>datetime.hpp</a></li><li><a href=#error_>error_info.hpp</a></li><li><a href=#exceptionhpp>exception.hpp</a></li><li><a href=#findhpp>find.hpp</a></li><li><a href=#formathpp>format.hpp</a></li><li><a href=#fromhpp>from.hpp</a></li><li><a href=#gethpp>get.hpp</a></li><li><a href=#intohpp>into.hpp</a></li><li><a href=#literalhpp>literal.hpp</a></li><li><a href=#ordered_>ordered_map.hpp</a></li><li><a href=#parserhpp>parser.hpp</a></li><li><a href=#resulthpp>result.hpp</a></li><li><a href=#serializerhpp>serializer.hpp</a></li><li><a href=#source_>source_location.hpp</a></li><li><a href=#spechpp>spec.hpp</a></li><li><a href=#tomlhpp>toml.hpp</a></li><li><a href=#toml_>toml_fwd.hpp</a></li><li><a href=#typeshpp>types.hpp</a></li><li><a href=#valuehpp>value.hpp</a></li><li><a href=#value_>value_t.hpp</a></li><li><a href=#versionhpp>version.hpp</a></li><li><a href=#visithpp>visit.hpp</a></li><li><a href=#notes>Notes</a></li></ul></li></ul></nav></div></aside></main></body></html>