Files
tomlplusplus/classtoml_1_1parse__result.html
2020-07-25 17:59:17 +00:00

430 lines
36 KiB
HTML

<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8"/>
<title>toml::parse_result class | toml++ TOML
for
modern
C++</title>
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" rel="stylesheet"/>
<link href="m-dark+documentation.compiled.css" rel="stylesheet"/>
<link href="tomlplusplus.css" rel="stylesheet"/>
<link href="favicon.ico" rel="icon" type="image/vnd.microsoft.icon"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta content="#22272e" name="theme-color"/>
<meta content="gbtcNgKlNiPSMKkYMw4zWFVWGPH_oU93m9n_-nb4qK8" name="google-site-verification"/>
<meta content="Header-only
TOML
config
file
parser
and
serializer
for
modern
C++." name="description"/>
<script src="tomlplusplus.js"></script>
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a class="m-col-t-8 m-col-m-none m-left-m" href="index.html" id="m-navbar-brand"><img alt="" src="logo.png"/>toml++ <span class="m-thin">TOML
for
modern
C++</span></a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a class="m-doc-search-icon" href="#search" onclick="return showSearch()" title="Search"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z" id="m-doc-search-icon-path"></path>
</svg></a>
<a href="#navigation" id="m-navbar-show" title="Show navigation"></a>
<a href="#" id="m-navbar-hide" title="Hide navigation"></a>
</div>
<div class="m-col-t-12 m-show-m m-col-m-none m-right-m" id="m-navbar-collapse">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
<li><a href="namespaces.html">Namespaces</a></li>
</ol>
<ol class="m-col-t-6 m-col-m-none" start="2">
<li><a href="annotated.html">Classes</a></li>
<li><a class="github tpp-external" href="https://github.com/marzer/tomlplusplus/" target="_blank">Github</a></li>
<li class="m-show-m"><a class="m-doc-search-icon" href="#search" onclick="return showSearch()" title="Search"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path"></use>
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>
<span class="m-breadcrumb"><a href="namespacetoml.html">toml</a>::<wbr/></span>parse_result <span class="m-thin">class</span> <span class="m-label m-flat m-warning">final</span>
</h1>
<p>The result of a parsing operation.</p>
<div class="m-block m-default">
<h3>Contents</h3>
<ul>
<li>
Reference
<ul>
<li><a href="#pub-types">Public types</a></li>
<li><a href="#typeless-methods">Constructors, destructors, conversion operators</a></li>
<li><a href="#pub-methods">Public functions</a></li>
</ul>
</li>
</ul>
</div>
<p>A <a class="m-doc" href="classtoml_1_1parse__result.html">parse_<wbr/>result</a> is effectively a discriminated union containing either a <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a> or a <a class="m-doc" href="classtoml_1_1parse__error.html">toml::<wbr/>parse_error</a>. Most member functions assume a particular one of these two states, and calling them when in the wrong state will cause errors (e.g. attempting to access the error object when parsing was successful).</p><pre class="m-code"><span class="ut">parse_result</span> <span class="n">result</span> <span class="o">=</span> <span class="ns">toml::</span><span class="n">parse_file</span><span class="p">(</span><span class="s">"config.toml"</span><span class="p">);</span>
<span class="k">if</span> <span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="n">do_stuff_with_a_table</span><span class="p">(</span><span class="n">result</span><span class="p">);</span> <span class="c1">//implicitly converts to table&amp;</span>
<span class="k">else</span>
<span class="ns">std::</span><span class="n">cerr</span> <span class="o">&lt;&lt;</span> <span class="s">"Parse failed:</span><span class="se">\n</span><span class="s">"</span><span class="sa">sv</span> <span class="o">&lt;&lt;</span> <span class="n">result</span><span class="p">.</span><span class="n">error</span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="ns">std::</span><span class="n">endl</span><span class="p">;</span></pre><pre class="m-console"><span class="go">example output:</span>
<span class="go">Parse failed:</span>
<span class="go">Encountered unexpected character while parsing boolean; expected 'true', saw 'trU'</span>
<span class="go"> (error occurred at line 1, column 13 of 'config.toml')</span></pre><p>Getting node_views (<code>operator[]</code>) and using the iterator accessor functions (<code><a class="m-doc" href="classtoml_1_1parse__result.html#a3f641e942f1518dffad6fcc7dc13893d">begin()</a>, <a class="m-doc" href="classtoml_1_1parse__result.html#a336d398e329f08195d714ff02fdffca6">end()</a></code> etc.) are unconditionally safe; when parsing fails these just return 'empty' values. A ranged-for loop on a failed <a class="m-doc" href="classtoml_1_1parse__result.html">parse_<wbr/>result</a> is also safe since <code><a class="m-doc" href="classtoml_1_1parse__result.html#a3f641e942f1518dffad6fcc7dc13893d">begin()</a></code> and <code><a class="m-doc" href="classtoml_1_1parse__result.html#a336d398e329f08195d714ff02fdffca6">end()</a></code> return the same iterator and will not lead to any dereferences and iterations.</p><aside class="m-note m-warning"><h4>Attention</h4><p><strong>This type only exists when exceptions are not enabled.</strong> Otherwise <a class="m-doc" href="classtoml_1_1parse__result.html">parse_<wbr/>result</a> is just an alias for <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a>:</p><pre class="m-code"><span class="cp">#if TOML_EXCEPTIONS</span>
<span class="k">using</span> <span class="ut">parse_result</span> <span class="o">=</span> <span class="ut">table</span><span class="p">;</span>
<span class="cp">#else</span>
<span class="k">class</span> <span class="nc">parse_result</span> <span class="k">final</span> <span class="p">{</span> <span class="c1">// ...</span>
<span class="cp">#endif</span></pre></aside>
<section id="pub-types">
<h2><a href="#pub-types">Public types</a></h2>
<dl class="m-doc">
<dt id="abf92ffb48c1f4d0f129f4032708d4ab0">
using <a class="m-doc-self" href="#abf92ffb48c1f4d0f129f4032708d4ab0">const_iterator</a> = <a class="m-doc" href="namespacetoml.html#adeb2aa84bcd2bcb46e2cdfaa5dd6572f">const_<wbr/>table_<wbr/>iterator</a>
</dt>
<dd>A <a class="m-doc tpp-injected tpp-external" href="https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator" target="_blank">BidirectionalIterator</a> for iterating over const key-value pairs in a wrapped <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a>.</dd>
<dt id="aae503c11e9f9162de5cbef5e2c9f4863">
using <a class="m-doc-self" href="#aae503c11e9f9162de5cbef5e2c9f4863">iterator</a> = <a class="m-doc" href="namespacetoml.html#a57894617837065610e5746a3204fa8e9">table_<wbr/>iterator</a>
</dt>
<dd>A <a class="m-doc tpp-injected tpp-external" href="https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator" target="_blank">BidirectionalIterator</a> for iterating over key-value pairs in a wrapped <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a>.</dd>
</dl>
</section>
<section id="typeless-methods">
<h2><a href="#typeless-methods">Constructors, destructors, conversion operators</a></h2>
<dl class="m-doc">
<dt id="a058b76f39fb5a971585538f2d4098ba5">
<span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a058b76f39fb5a971585538f2d4098ba5">parse_result</a>(</span><span class="m-doc-wrap"><a class="m-doc" href="classtoml_1_1parse__result.html">parse_<wbr/>result</a>&amp;&amp; res) <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Move constructor.</dd>
<dt id="ad9e22f09854af4c36860d61e0c0f25b1">
<span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#ad9e22f09854af4c36860d61e0c0f25b1">~parse_result</a>(</span><span class="m-doc-wrap">) <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Destructor.</dd>
<dt id="af66ea78a6dd881521ce865a372298e12">
<span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#af66ea78a6dd881521ce865a372298e12">operator bool</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-flat m-info">explicit</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns true if parsing succeeded.</dd>
<dt id="a43df64e02443b2abfd9d2c86c5e4c30a">
<span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a43df64e02443b2abfd9d2c86c5e4c30a">operator const parse_error&amp;</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-flat m-info">explicit</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1parse__error.html">toml::<wbr/>parse_error</a> (const lvalue overload).</dd>
<dt id="a9d059289edaf6c7fb71916b21a2f9c9f">
<span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a9d059289edaf6c7fb71916b21a2f9c9f">operator const toml::table&amp;</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a> (const lvalue overload).</dd>
<dt id="abc8a693cb538441b5974eff38c716669">
<span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#abc8a693cb538441b5974eff38c716669">operator parse_error&amp;</a>(</span><span class="m-doc-wrap">) <span class="m-label m-flat m-info">explicit</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1parse__error.html">toml::<wbr/>parse_error</a>.</dd>
<dt id="a9f70aa665d84aaf5f936dd27f6c95c4a">
<span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a9f70aa665d84aaf5f936dd27f6c95c4a">operator parse_error&amp;&amp;</a>(</span><span class="m-doc-wrap">) <span class="m-label m-flat m-info">explicit</span> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1parse__error.html">toml::<wbr/>parse_error</a> (rvalue overload).</dd>
<dt id="a5e14e22d4d68b27c11711a3319dc6bf9">
<span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a5e14e22d4d68b27c11711a3319dc6bf9">operator toml::table&amp;</a>(</span><span class="m-doc-wrap">) <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a>.</dd>
<dt id="a8dca1600886954b38b99a4a4f9cb77c4">
<span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a8dca1600886954b38b99a4a4f9cb77c4">operator toml::table&amp;&amp;</a>(</span><span class="m-doc-wrap">) <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a> (rvalue overload).</dd>
</dl>
</section>
<section id="pub-methods">
<h2><a href="#pub-methods">Public functions</a></h2>
<dl class="m-doc">
<dt>
<span class="m-doc-wrap-bumper">auto <a class="m-doc" href="#a910f13933a0547a2920404287829781f">begin</a>(</span><span class="m-doc-wrap">) const -&gt; <a class="m-doc" href="namespacetoml.html#adeb2aa84bcd2bcb46e2cdfaa5dd6572f">const_<wbr/>table_<wbr/>iterator</a> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns an iterator to the first key-value pair in the wrapped table.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a class="m-doc" href="#a3f641e942f1518dffad6fcc7dc13893d">begin</a>(</span><span class="m-doc-wrap">) -&gt; <a class="m-doc" href="namespacetoml.html#a57894617837065610e5746a3204fa8e9">table_<wbr/>iterator</a> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns an iterator to the first key-value pair in the wrapped table.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a class="m-doc" href="#af58212d8a367e5c1d38eb5d58708754b">cbegin</a>(</span><span class="m-doc-wrap">) const -&gt; <a class="m-doc" href="namespacetoml.html#adeb2aa84bcd2bcb46e2cdfaa5dd6572f">const_<wbr/>table_<wbr/>iterator</a> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns an iterator to the first key-value pair in the wrapped table.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a class="m-doc" href="#afa4f821ad60ceb06327cec6b42b05071">cend</a>(</span><span class="m-doc-wrap">) const -&gt; <a class="m-doc" href="namespacetoml.html#adeb2aa84bcd2bcb46e2cdfaa5dd6572f">const_<wbr/>table_<wbr/>iterator</a> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns an iterator to one-past-the-last key-value pair in the wrapped table.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a class="m-doc" href="#a154d32bca3ea50dc5030372675a85a65">end</a>(</span><span class="m-doc-wrap">) const -&gt; <a class="m-doc" href="namespacetoml.html#adeb2aa84bcd2bcb46e2cdfaa5dd6572f">const_<wbr/>table_<wbr/>iterator</a> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns an iterator to one-past-the-last key-value pair in the wrapped table.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a class="m-doc" href="#a336d398e329f08195d714ff02fdffca6">end</a>(</span><span class="m-doc-wrap">) -&gt; <a class="m-doc" href="namespacetoml.html#a57894617837065610e5746a3204fa8e9">table_<wbr/>iterator</a> <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns an iterator to one-past-the-last key-value pair in the wrapped table.</dd>
<dt id="ab07914228f9f7436628c99df454f177d">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#ab07914228f9f7436628c99df454f177d">error</a>(</span><span class="m-doc-wrap">) &amp;&amp; -&gt; <a class="m-doc" href="classtoml_1_1parse__error.html">parse_<wbr/>error</a>&amp;&amp; <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1parse__error.html">toml::<wbr/>parse_error</a> (rvalue overload).</dd>
<dt id="aefbb9aafdf00fa1ac979962d22e12e68">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#aefbb9aafdf00fa1ac979962d22e12e68">error</a>(</span><span class="m-doc-wrap">) &amp; -&gt; <a class="m-doc" href="classtoml_1_1parse__error.html">parse_<wbr/>error</a>&amp; <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1parse__error.html">toml::<wbr/>parse_error</a>.</dd>
<dt id="a9a5929b01df9a7f7f986b8431cefd2b8">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a9a5929b01df9a7f7f986b8431cefd2b8">error</a>(</span><span class="m-doc-wrap">) const &amp; -&gt; const <a class="m-doc" href="classtoml_1_1parse__error.html">parse_<wbr/>error</a>&amp; <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1parse__error.html">toml::<wbr/>parse_error</a> (const lvalue overload).</dd>
<dt id="a9097bc552007537f840602ceca00e99b">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a9097bc552007537f840602ceca00e99b">failed</a>(</span><span class="m-doc-wrap">) const -&gt; bool <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns true if parsing failed.</dd>
<dt id="aa4c2c770a8d214f9d508582233ff1d84">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#aa4c2c770a8d214f9d508582233ff1d84">operator=</a>(</span><span class="m-doc-wrap"><a class="m-doc" href="classtoml_1_1parse__result.html">parse_<wbr/>result</a>&amp;&amp; rhs) -&gt; <a class="m-doc" href="classtoml_1_1parse__result.html">parse_<wbr/>result</a>&amp; <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Move-assignment operator.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a class="m-doc" href="#a58a3ee971220497ef922fc2ab5c7a9c0">operator[]</a>(</span><span class="m-doc-wrap"><a class="m-doc tpp-injected tpp-external" href="https://en.cppreference.com/w/cpp/string/basic_string_view" target="_blank">std::wstring_view</a> key) const -&gt; <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a>&lt;const <a class="m-doc" href="classtoml_1_1node.html">node</a>&gt; <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Gets a <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a> for the selected key-value pair in the wrapped table (const overload).</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a class="m-doc" href="#ade8c625d35dcc5b4fdec97d9f5a7f96f">operator[]</a>(</span><span class="m-doc-wrap"><a class="m-doc tpp-injected tpp-external" href="https://en.cppreference.com/w/cpp/string/basic_string_view" target="_blank">std::wstring_view</a> key) -&gt; <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a>&lt;<a class="m-doc" href="classtoml_1_1node.html">node</a>&gt; <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Gets a <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a> for the selected key-value pair in the wrapped table.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a class="m-doc" href="#a3b88dad377d33e1fdda317177025fba5">operator[]</a>(</span><span class="m-doc-wrap">string_view key) const -&gt; <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a>&lt;const <a class="m-doc" href="classtoml_1_1node.html">node</a>&gt; <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Gets a <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a> for the selected key-value pair in the wrapped table (const overload).</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a class="m-doc" href="#aaa83205a294dedd8857844d0b6378560">operator[]</a>(</span><span class="m-doc-wrap">string_view key) -&gt; <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a>&lt;<a class="m-doc" href="classtoml_1_1node.html">node</a>&gt; <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Gets a <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a> for the selected key-value pair in the wrapped table.</dd>
<dt id="ab5bfcd6ed385016395029bd69ad78a3c">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#ab5bfcd6ed385016395029bd69ad78a3c">succeeded</a>(</span><span class="m-doc-wrap">) const -&gt; bool <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns true if parsing succeeeded.</dd>
<dt id="a77b470b66dd401a0a929006dd788b882">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a77b470b66dd401a0a929006dd788b882">table</a>(</span><span class="m-doc-wrap">) &amp;&amp; -&gt; <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a>&amp;&amp; <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a> (rvalue overload).</dd>
<dt id="a47d2ead20ae9d1681210c63319a6a162">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a47d2ead20ae9d1681210c63319a6a162">table</a>(</span><span class="m-doc-wrap">) &amp; -&gt; <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a>&amp; <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a>.</dd>
<dt id="a993f5d59c4b10f87138f8abb8a16d51d">
<span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a993f5d59c4b10f87138f8abb8a16d51d">table</a>(</span><span class="m-doc-wrap">) const &amp; -&gt; const <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a>&amp; <span class="m-label m-flat m-success">noexcept</span></span>
</dt>
<dd>Returns the internal <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a> (const lvalue overload).</dd>
</dl>
</section>
<section>
<h2>Function documentation</h2>
<section class="m-doc-details" id="a910f13933a0547a2920404287829781f"><div>
<h3>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="namespacetoml.html#adeb2aa84bcd2bcb46e2cdfaa5dd6572f">const_<wbr/>table_<wbr/>iterator</a> toml::<wbr/>parse_result::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a910f13933a0547a2920404287829781f">begin</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Returns an iterator to the first key-value pair in the wrapped table.</p>
<aside class="m-note m-default"><h4>Remark</h4><p>Returns a default-constructed 'nothing' iterator if the parsing failed.</p></aside>
</div></section>
<section class="m-doc-details" id="a3f641e942f1518dffad6fcc7dc13893d"><div>
<h3>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="namespacetoml.html#a57894617837065610e5746a3204fa8e9">table_<wbr/>iterator</a> toml::<wbr/>parse_result::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a3f641e942f1518dffad6fcc7dc13893d">begin</a>(</span><span class="m-doc-wrap">) <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Returns an iterator to the first key-value pair in the wrapped table.</p>
<aside class="m-note m-default"><h4>Remark</h4><p>Returns a default-constructed 'nothing' iterator if the parsing failed.</p></aside>
</div></section>
<section class="m-doc-details" id="af58212d8a367e5c1d38eb5d58708754b"><div>
<h3>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="namespacetoml.html#adeb2aa84bcd2bcb46e2cdfaa5dd6572f">const_<wbr/>table_<wbr/>iterator</a> toml::<wbr/>parse_result::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#af58212d8a367e5c1d38eb5d58708754b">cbegin</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Returns an iterator to the first key-value pair in the wrapped table.</p>
<aside class="m-note m-default"><h4>Remark</h4><p>Returns a default-constructed 'nothing' iterator if the parsing failed.</p></aside>
</div></section>
<section class="m-doc-details" id="afa4f821ad60ceb06327cec6b42b05071"><div>
<h3>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="namespacetoml.html#adeb2aa84bcd2bcb46e2cdfaa5dd6572f">const_<wbr/>table_<wbr/>iterator</a> toml::<wbr/>parse_result::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#afa4f821ad60ceb06327cec6b42b05071">cend</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Returns an iterator to one-past-the-last key-value pair in the wrapped table.</p>
<aside class="m-note m-default"><h4>Remark</h4><p>Returns a default-constructed 'nothing' iterator if the parsing failed.</p></aside>
</div></section>
<section class="m-doc-details" id="a154d32bca3ea50dc5030372675a85a65"><div>
<h3>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="namespacetoml.html#adeb2aa84bcd2bcb46e2cdfaa5dd6572f">const_<wbr/>table_<wbr/>iterator</a> toml::<wbr/>parse_result::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a154d32bca3ea50dc5030372675a85a65">end</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Returns an iterator to one-past-the-last key-value pair in the wrapped table.</p>
<aside class="m-note m-default"><h4>Remark</h4><p>Returns a default-constructed 'nothing' iterator if the parsing failed.</p></aside>
</div></section>
<section class="m-doc-details" id="a336d398e329f08195d714ff02fdffca6"><div>
<h3>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="namespacetoml.html#a57894617837065610e5746a3204fa8e9">table_<wbr/>iterator</a> toml::<wbr/>parse_result::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a336d398e329f08195d714ff02fdffca6">end</a>(</span><span class="m-doc-wrap">) <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Returns an iterator to one-past-the-last key-value pair in the wrapped table.</p>
<aside class="m-note m-default"><h4>Remark</h4><p>Returns a default-constructed 'nothing' iterator if the parsing failed.</p></aside>
</div></section>
<section class="m-doc-details" id="a58a3ee971220497ef922fc2ab5c7a9c0"><div>
<h3>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a>&lt;const <a class="m-doc" href="classtoml_1_1node.html">node</a>&gt; toml::<wbr/>parse_result::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a58a3ee971220497ef922fc2ab5c7a9c0">operator[]</a>(</span><span class="m-doc-wrap"><a class="m-doc tpp-injected tpp-external" href="https://en.cppreference.com/w/cpp/string/basic_string_view" target="_blank">std::wstring_view</a> key) const <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Gets a <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a> for the selected key-value pair in the wrapped table (const overload).</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">key</td>
<td>The key used for the lookup.</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Returns</th>
<td>A view of the value at the given key if parsing was successful and a matching key existed, or an empty node view.</td>
</tr>
</tfoot>
</table>
<aside class="m-note m-default"><h4>See also</h4><p><a class="m-doc" href="classtoml_1_1node__view.html">toml::<wbr/>node_view</a></p></aside><aside class="m-note m-warning"><h4>Attention</h4><p>This overload is only available when <a class="m-doc" href="group__configuration.html#ga0785b375499ea976c627d775f8fc747b">TOML_<wbr/>WINDOWS_<wbr/>COMPAT</a> is enabled.</p></aside>
</div></section>
<section class="m-doc-details" id="ade8c625d35dcc5b4fdec97d9f5a7f96f"><div>
<h3>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a>&lt;<a class="m-doc" href="classtoml_1_1node.html">node</a>&gt; toml::<wbr/>parse_result::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#ade8c625d35dcc5b4fdec97d9f5a7f96f">operator[]</a>(</span><span class="m-doc-wrap"><a class="m-doc tpp-injected tpp-external" href="https://en.cppreference.com/w/cpp/string/basic_string_view" target="_blank">std::wstring_view</a> key) <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Gets a <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a> for the selected key-value pair in the wrapped table.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">key</td>
<td>The key used for the lookup.</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Returns</th>
<td>A view of the value at the given key if parsing was successful and a matching key existed, or an empty node view.</td>
</tr>
</tfoot>
</table>
<aside class="m-note m-default"><h4>See also</h4><p><a class="m-doc" href="classtoml_1_1node__view.html">toml::<wbr/>node_view</a></p></aside><aside class="m-note m-warning"><h4>Attention</h4><p>This overload is only available when <a class="m-doc" href="group__configuration.html#ga0785b375499ea976c627d775f8fc747b">TOML_<wbr/>WINDOWS_<wbr/>COMPAT</a> is enabled.</p></aside>
</div></section>
<section class="m-doc-details" id="a3b88dad377d33e1fdda317177025fba5"><div>
<h3>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a>&lt;const <a class="m-doc" href="classtoml_1_1node.html">node</a>&gt; toml::<wbr/>parse_result::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a3b88dad377d33e1fdda317177025fba5">operator[]</a>(</span><span class="m-doc-wrap">string_view key) const <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Gets a <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a> for the selected key-value pair in the wrapped table (const overload).</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">key</td>
<td>The key used for the lookup.</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Returns</th>
<td>A view of the value at the given key if parsing was successful and a matching key existed, or an empty node view.</td>
</tr>
</tfoot>
</table>
<aside class="m-note m-default"><h4>See also</h4><p><a class="m-doc" href="classtoml_1_1node__view.html">toml::<wbr/>node_view</a></p></aside>
</div></section>
<section class="m-doc-details" id="aaa83205a294dedd8857844d0b6378560"><div>
<h3>
<span class="m-doc-wrap-bumper"><a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a>&lt;<a class="m-doc" href="classtoml_1_1node.html">node</a>&gt; toml::<wbr/>parse_result::<wbr/></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#aaa83205a294dedd8857844d0b6378560">operator[]</a>(</span><span class="m-doc-wrap">string_view key) <span class="m-label m-success">noexcept</span></span></span>
</h3>
<p>Gets a <a class="m-doc" href="classtoml_1_1node__view.html">node_<wbr/>view</a> for the selected key-value pair in the wrapped table.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">key</td>
<td>The key used for the lookup.</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Returns</th>
<td>A view of the value at the given key if parsing was successful and a matching key existed, or an empty node view.</td>
</tr>
</tfoot>
</table>
<aside class="m-note m-default"><h4>See also</h4><p><a class="m-doc" href="classtoml_1_1node__view.html">toml::<wbr/>node_view</a></p></aside>
</div></section>
</section>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount"></div>
</div>
<div class="m-doc-search-content">
<form>
<input autocomplete="off" autofocus="autofocus" disabled="disabled" id="search-input" name="q" placeholder="Loading …" spellcheck="false" type="search"/>
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div class="m-text m-dim m-text-center" id="search-help">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim"></span>
/ <span class="m-label m-dim"></span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div class="m-text m-warning m-text-center" id="search-notfound">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v1.js"></script>
<script async="async" src="searchdata-v1.js"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<a class="tpp-external" href="https://github.com/marzer/tomlplusplus/" target="_blank">Github</a>
<a class="tpp-external" href="https://github.com/marzer/tomlplusplus/issues" target="_blank">Report
an
issue</a>
<br/><br/>Documentation
generated
using
<a class="tpp-external" href="https://mcss.mosra.cz/" target="_blank">m.css</a>
</div>
</div>
</div>
</nav></footer>
</body></html>