summaryrefslogtreecommitdiff
path: root/classtoml_1_1key.html
blob: 1fa1051f5dfe306d5ffdd9a576838372d6975cb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
<!DOCTYPE html>
<html lang="en"><head>
  <meta charset="utf-8"/>
  <title>toml::key class | toml++ TOML for C++</title>
  <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"/>
  <link href="poxy/poxy.css" referrerpolicy="no-referrer" rel="stylesheet"/>
  <script src="poxy/poxy.js"></script>
  <script>initialize_theme("dark");</script>
  <meta content="toml++" name="twitter:title"/>
  <meta content="toml++" property="og:title"/>
  <meta content="toml++" itemprop="name"/>
  <meta content="Mark Gillard" name="author"/>
  <meta content="Mark Gillard" property="article:author"/>
  <meta content="TOML for C++" name="description"/>
  <meta content="TOML for C++" name="twitter:description"/>
  <meta content="TOML for C++" property="og:description"/>
  <meta content="TOML for C++" itemprop="description"/>
  <meta content="telephone=no" name="format-detection"/>
  <meta content="Poxy v0.20.1" name="generator"/>
  <meta content="strict-origin-when-cross-origin" name="referrer"/>
  <meta content="gbtcNgKlNiPSMKkYMw4zWFVWGPH_oU93m9n_-nb4qK8" name="google-site-verification"/>
</head>
<body class="poxy-has-toc">
<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"><svg class="poxy-injected-svg" id="poxy-injected-svg-0" version="1.1" viewBox="0 0 306 306" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon fill="currentColor" points="0 0 0 306 67.79 306 67.79 273.09 35.1 273.09 35.1 33.62 67.79 33.62 67.79 0 0 0"></polygon><polygon fill="currentColor" points="237.62 0 237.62 33.62 270.3 33.62 270.3 273.09 237.62 273.09 237.62 306 306 306 306 0 237.62 0"></polygon><polygon fill="currentColor" points="127.3 247.43 127.3 109.37 172.72 109.37 172.72 77.69 48.41 77.69 48.41 109.37 94.43 109.37 94.43 247.43 127.3 247.43"></polygon><polygon fill="currentColor" points="256.69 163.46 241.45 163.46 241.45 148.22 222.33 148.22 222.33 163.46 207.09 163.46 207.09 182.58 222.33 182.58 222.33 197.82 241.45 197.82 241.45 182.58 256.69 182.58 256.69 163.46"></polygon><polygon fill="currentColor" points="192.74 163.46 177.5 163.46 177.5 148.22 158.38 148.22 158.38 163.46 143.14 163.46 143.14 182.58 158.38 182.58 158.38 197.82 177.5 197.82 177.5 182.58 192.74 182.58 192.74 163.46"></polygon></svg>toml++ <span class="m-thin">TOML for 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>
            <li><a href="annotated.html">Classes</a></li>
            <li class="poxy-navbar-version-selector"><a href="classtoml_1_1key.html">Version: HEAD</a><ol><li><a href="classtoml_1_1key.html">HEAD</a></li></ol></li>
            <li><a class="poxy-icon twitter poxy-external" href="https://twitter.com/marzer8789" target="_blank" title="Twitter"><svg id="poxy-icon-twitter" version="1.1" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg"><path d="M 50.0625 10.4375 C 48.214844 11.257813 46.234375 11.808594 44.152344 12.058594 C 46.277344 10.785156 47.910156 8.769531 48.675781 6.371094 C 46.691406 7.546875 44.484375 8.402344 42.144531 8.863281 C 40.269531 6.863281 37.597656 5.617188 34.640625 5.617188 C 28.960938 5.617188 24.355469 10.21875 24.355469 15.898438 C 24.355469 16.703125 24.449219 17.488281 24.625 18.242188 C 16.078125 17.8125 8.503906 13.71875 3.429688 7.496094 C 2.542969 9.019531 2.039063 10.785156 2.039063 12.667969 C 2.039063 16.234375 3.851563 19.382813 6.613281 21.230469 C 4.925781 21.175781 3.339844 20.710938 1.953125 19.941406 C 1.953125 19.984375 1.953125 20.027344 1.953125 20.070313 C 1.953125 25.054688 5.5 29.207031 10.199219 30.15625 C 9.339844 30.390625 8.429688 30.515625 7.492188 30.515625 C 6.828125 30.515625 6.183594 30.453125 5.554688 30.328125 C 6.867188 34.410156 10.664063 37.390625 15.160156 37.472656 C 11.644531 40.230469 7.210938 41.871094 2.390625 41.871094 C 1.558594 41.871094 0.742188 41.824219 -0.0585938 41.726563 C 4.488281 44.648438 9.894531 46.347656 15.703125 46.347656 C 34.617188 46.347656 44.960938 30.679688 44.960938 17.09375 C 44.960938 16.648438 44.949219 16.199219 44.933594 15.761719 C 46.941406 14.3125 48.683594 12.5 50.0625 10.4375 Z" fill="currentColor"></path></svg></a></li>
          </ol>
          <ol class="m-col-t-6 m-col-m-none" start="5">
            <li><a class="poxy-icon repo github poxy-external" href="https://github.com/marzer/tomlplusplus" target="_blank" title="View on GitHub"><svg id="poxy-icon-repo" version="1.1" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg"><path d="M25,1.23a24.37,24.37,0,0,0-7.7,47.5C18.51,49,19,48.2,19,47.56s0-2.12,0-4.15c-6.78,1.47-8.21-3.27-8.21-3.27C9.61,37.33,8,36.58,8,36.58c-2.21-1.51.17-1.48.17-1.48a5.12,5.12,0,0,1,3.73,2.51c2.17,3.72,5.7,2.65,7.09,2a5.25,5.25,0,0,1,1.55-3.26c-5.41-.61-11.1-2.7-11.1-12A9.41,9.41,0,0,1,12,17.79a8.75,8.75,0,0,1,.24-6.45s2-.66,6.7,2.49a23.1,23.1,0,0,1,12.2,0c4.66-3.15,6.7-2.49,6.7-2.49A8.75,8.75,0,0,1,38,17.79a9.41,9.41,0,0,1,2.51,6.54c0,9.36-5.7,11.42-11.13,12a5.83,5.83,0,0,1,1.65,4.51c0,3.26,0,5.89,0,6.69,0,.65.44,1.41,1.68,1.17A24.38,24.38,0,0,0,25,1.23Z" fill="currentColor"></path></svg></a></li>
            <li><a class="poxy-icon sponsor poxy-external" href="https://github.com/sponsors/marzer" target="_blank" title="Become a sponsor"><svg id="poxy-icon-sponsor" version="1.1" viewBox="0 0 66.911 66.911" xmlns="http://www.w3.org/2000/svg"><path d="M66.911,22.831c0-10.563-8.558-19.122-19.118-19.122c-5.658,0-10.721,2.473-14.223,6.377  c-0.037,0.043-0.076,0.085-0.113,0.128c-3.5-3.98-8.618-6.505-14.334-6.505C8.561,3.709,0.005,12.268,0,22.831  c0,5.834,2.629,11.059,6.758,14.565H6.751l27.104,25.806l26.308-25.806h-0.012C64.279,33.89,66.911,28.669,66.911,22.831z" fill="currentColor"></path></svg></a></li>
            <li><a class="poxy-icon theme" href="javascript:void(null);" id="poxy-theme-switch" onclick="toggle_theme(); return false;" role="button" title="Toggle dark and light themes"><svg id="poxy-theme-switch-img" version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><circle cx="185.6708" cy="183.8122" fill="currentColor" r="65.625"></circle><path d="M185.6708,87.5622a13.1256,13.1256,0,0,0,13.125-13.125V52.5622a13.125,13.125,0,1,0-26.25,0v21.875A13.1257,13.1257,0,0,0,185.6708,87.5622Z" fill="currentColor"></path><path d="M99.051,115.7519a13.1236,13.1236,0,1,0,18.56-18.56L102.1442,81.726a13.1236,13.1236,0,0,0-18.5595,18.56Z" fill="currentColor"></path><path d="M89.4208,183.8122a13.1257,13.1257,0,0,0-13.125-13.125H54.4208a13.125,13.125,0,0,0,0,26.25h21.875A13.1256,13.1256,0,0,0,89.4208,183.8122Z" fill="currentColor"></path><path d="M99.051,251.8725,83.5847,267.3431a13.1236,13.1236,0,1,0,18.56,18.56l15.4663-15.4706a13.1236,13.1236,0,1,0-18.5595-18.56Z" fill="currentColor"></path><path d="M185.6708,280.0622a13.1258,13.1258,0,0,0-13.125,13.125v21.875a13.125,13.125,0,0,0,26.25,0v-21.875A13.1257,13.1257,0,0,0,185.6708,280.0622Z" fill="currentColor"></path><path d="M272.2907,251.8725a13.1236,13.1236,0,1,0-18.56,18.56l15.4663,15.4706a13.1236,13.1236,0,1,0,18.56-18.56Z" fill="currentColor"></path><path d="M330.0458,183.8122a13.1257,13.1257,0,0,0-13.125-13.125h-21.875a13.125,13.125,0,0,0,0,26.25h21.875A13.1256,13.1256,0,0,0,330.0458,183.8122Z" fill="currentColor"></path><path d="M263.0109,119.5971a13.0824,13.0824,0,0,0,9.28-3.8452l15.4663-15.4663a13.1236,13.1236,0,1,0-18.56-18.56L253.7312,97.1923a13.125,13.125,0,0,0,9.28,22.4048Z" fill="currentColor"></path><path d="M456.9379,401.6714a63.97,63.97,0,0,1-14.9963,7.2055c-19.6448,6.5283-41.8787,2.9566-58.1439-9.8523a68.9311,68.9311,0,0,1-10.835-10.8339c-12.8088-16.2663-16.3806-38.5-9.8523-58.1471a63.8444,63.8444,0,0,1,7.2077-14.9931,8.8036,8.8036,0,0,0-10.1172-13.3034,87.5188,87.5188,0,1,0,110.0372,110.04A8.8,8.8,0,0,0,456.9379,401.6714Z" fill="currentColor"></path></svg></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>key <span class="m-thin">class</span>
        </h1>
        <p>A key parsed from a TOML document.</p>
        <nav class="m-block m-default poxy-toc" id="poxy-toc">
          <h3>Contents</h3>
          <ul>
            <li>
              Reference
              <ul>
                <li><a href="#typeless-methods">Constructors, destructors, conversion operators</a></li>
                <li><a href="#equality-and-comparison">Equality and Comparison</a></li>
                <li><a href="#iteration">Iteration</a></li>
                <li><a href="#metadata">Metadata</a></li>
                <li><a href="#string-operations">String operations</a></li>
                <li><a href="#friends">Friends</a></li>
              </ul>
            </li>
          </ul>
        </nav>
<p>These are used as the internal keys for a <a class="m-doc" href="classtoml_1_1table.html">toml::<wbr/>table</a>:</p><pre class="m-code"><span class="k">const</span> <span class="nn">toml</span><span class="o">::</span><span class="nc">table</span> <span class="n">tbl</span> <span class="o">=</span> <span class="sa">R</span><span class="s">"</span><span class="dl">(</span>
<span class="s">    a = 1</span>
<span class="s">      b = 2</span>
<span class="s">        c = 3</span>
<span class="dl">)</span><span class="s">"_toml</span><span class="p">;</span>

<span class="k">for</span> <span class="p">(</span><span class="k">auto</span><span class="o">&amp;&amp;</span> <span class="p">[</span><span class="n">k</span><span class="p">,</span> <span class="n">v</span><span class="p">]</span> <span class="o">:</span> <span class="n">tbl</span><span class="p">)</span>
    <span class="nn">std</span><span class="o">::</span><span class="nc">cout</span> <span class="o">&lt;&lt;</span> <span class="s">"key '"sv</span> <span class="o">&lt;&lt;</span> <span class="n">k</span> <span class="o">&lt;&lt;</span> <span class="s">"' defined at "sv</span> <span class="o">&lt;&lt;</span> <span class="n">k</span><span class="p">.</span><span class="nf">source</span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">;</span></pre><pre class="m-console"><span class="go">key 'a' defined at line 2, column 5</span>
<span class="go">key 'b' defined at line 3, column 7</span>
<span class="go">key 'c' defined at line 4, column 9</span></pre>
        <section id="typeless-methods">
          <h2><a href="#typeless-methods">Constructors, destructors, conversion operators</a></h2>
          <dl class="m-doc">
            <dt id="ac978efd3b48ec0a5c14f08618e4dbe23">
              <span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#ac978efd3b48ec0a5c14f08618e4dbe23">key</a>(</span><span class="m-doc-wrap">) <span class="m-label m-flat m-info">defaulted</span> <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Default constructor.</dd>
            <dt id="a5119f122c15687a2f0f81b270a627de2">
              <span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a5119f122c15687a2f0f81b270a627de2">key</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> k,
              <a class="m-doc" href="structtoml_1_1source__region.html">source_<wbr/>region</a>&amp;&amp; src = {}) <span class="m-label m-flat m-info">explicit</span> </span>
            </dt>
            <dd>Constructs a key from a string view and <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source region</a>.</dd>
            <dt id="a0718eb26f4d9c1a4c0fb928efb0d6f81">
              <span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a0718eb26f4d9c1a4c0fb928efb0d6f81">key</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> k,
              const <a class="m-doc" href="structtoml_1_1source__region.html">source_<wbr/>region</a>&amp; src) <span class="m-label m-flat m-info">explicit</span> </span>
            </dt>
            <dd>Constructs a key from a string view and <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source region</a>.</dd>
            <dt id="a788b1bbeaf636dccc4a78f832bf123e0">
              <span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a788b1bbeaf636dccc4a78f832bf123e0">key</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string.html" target="_blank">std::<wbr/>string</a>&amp;&amp; k,
              <a class="m-doc" href="structtoml_1_1source__region.html">source_<wbr/>region</a>&amp;&amp; src = {}) <span class="m-label m-flat m-info">explicit</span>  <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Constructs a key from a string and <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source region</a>.</dd>
            <dt id="ab86ff590f222d57b8f4630901298d8da">
              <span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#ab86ff590f222d57b8f4630901298d8da">key</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string.html" target="_blank">std::<wbr/>string</a>&amp;&amp; k,
              const <a class="m-doc" href="structtoml_1_1source__region.html">source_<wbr/>region</a>&amp; src) <span class="m-label m-flat m-info">explicit</span>  <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Constructs a key from a string and <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source region</a>.</dd>
            <dt id="a981f5ee2fbd822d47d0b347c5df55f11">
              <span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a981f5ee2fbd822d47d0b347c5df55f11">key</a>(</span><span class="m-doc-wrap">const char* k,
              <a class="m-doc" href="structtoml_1_1source__region.html">source_<wbr/>region</a>&amp;&amp; src = {}) <span class="m-label m-flat m-info">explicit</span> </span>
            </dt>
            <dd>Constructs a key from a c-string and <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source region</a>.</dd>
            <dt id="ad5f26b37172e34a8c70e848ad7911710">
              <span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#ad5f26b37172e34a8c70e848ad7911710">key</a>(</span><span class="m-doc-wrap">const char* k,
              const <a class="m-doc" href="structtoml_1_1source__region.html">source_<wbr/>region</a>&amp; src) <span class="m-label m-flat m-info">explicit</span> </span>
            </dt>
            <dd>Constructs a key from a c-string view and <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source region</a>.</dd>
            <dt>
              <span class="m-doc-wrap-bumper"><a class="m-doc" href="#a67cfed717c84773ab3fe6ec1b7936fa7">key</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>wstring_view</a> k,
              <a class="m-doc" href="structtoml_1_1source__region.html">source_<wbr/>region</a>&amp;&amp; src = {}) <span class="m-label m-flat m-info">explicit</span> </span>
            </dt>
            <dd>Constructs a key from a wide string view and <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source region</a>.</dd>
            <dt>
              <span class="m-doc-wrap-bumper"><a class="m-doc" href="#aba2cb69db8cae7cbc60899a0ee7618d3">key</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>wstring_view</a> k,
              const <a class="m-doc" href="structtoml_1_1source__region.html">source_<wbr/>region</a>&amp; src) <span class="m-label m-flat m-info">explicit</span> </span>
            </dt>
            <dd>Constructs a key from a wide string and <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source region</a>.</dd>
          </dl>
        </section>
        <section id="equality-and-comparison">
          <h2><a href="#equality-and-comparison">Equality and Comparison</a></h2>
<aside class="m-note m-warning"><h4>Attention</h4><p>These operations only compare the underlying strings; <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source regions</a> are ignored for the purposes of all comparison!</p></aside>
          <dl class="m-doc">
            <dt id="a1255e940048a362bda11ee240b3f1ffe">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a1255e940048a362bda11ee240b3f1ffe">operator!=</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() != rhs.str()</code>.</dd>
            <dt id="a24ea2ab9799ab7fec679f2dae3afccf2">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a24ea2ab9799ab7fec679f2dae3afccf2">operator!=</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              <a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() != rhs</code>.</dd>
            <dt id="a165b2057b0144350b1c291ffb0956122">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a165b2057b0144350b1c291ffb0956122">operator!=</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs != rhs.str()</code>.</dd>
            <dt id="a7a6f49b1bdf3e234f7598481a4afd5db">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a7a6f49b1bdf3e234f7598481a4afd5db">operator&lt;</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() &lt; rhs.str()</code>.</dd>
            <dt id="a5578fc46610d6f6e684fbffdf3f61a44">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a5578fc46610d6f6e684fbffdf3f61a44">operator&lt;</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              <a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() &lt; rhs</code>.</dd>
            <dt id="a1bacd712822950e9594fd288a236c9cb">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a1bacd712822950e9594fd288a236c9cb">operator&lt;</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs &lt; rhs.str()</code>.</dd>
            <dt id="ae300be177925b12b73568e194c1444ae">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#ae300be177925b12b73568e194c1444ae">operator&lt;=</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() &lt;= rhs.str()</code>.</dd>
            <dt id="a9c59103b835fb600dbb6c808f8c4f8a8">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a9c59103b835fb600dbb6c808f8c4f8a8">operator&lt;=</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              <a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() &lt;= rhs</code>.</dd>
            <dt id="a780d9a226184919f080acf0b0a676400">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a780d9a226184919f080acf0b0a676400">operator&lt;=</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs &lt;= rhs.str()</code>.</dd>
            <dt id="aa1d636ad061ad2c8e33c629e112bba5e">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#aa1d636ad061ad2c8e33c629e112bba5e">operator==</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() == rhs.str()</code>.</dd>
            <dt id="a545b27567960385af1c8ae669029d7dd">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a545b27567960385af1c8ae669029d7dd">operator==</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              <a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() == rhs</code>.</dd>
            <dt id="aed4a71da8d0ffb75d847ab2c26948a1c">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#aed4a71da8d0ffb75d847ab2c26948a1c">operator==</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs == rhs.str()</code>.</dd>
            <dt id="ae51dcf0f86bed0f6f5ce24d326c0badc">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#ae51dcf0f86bed0f6f5ce24d326c0badc">operator&gt;</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() &gt; rhs.str()</code>.</dd>
            <dt id="ad48d1d36a11a9434bc339987838b08f6">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#ad48d1d36a11a9434bc339987838b08f6">operator&gt;</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              <a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() &gt; rhs</code>.</dd>
            <dt id="aa85755cf51a2ee6d616aa03a8de8b4b0">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#aa85755cf51a2ee6d616aa03a8de8b4b0">operator&gt;</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs &gt; rhs.str()</code>.</dd>
            <dt id="a3c20053f6eae90f946535a95225f522a">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a3c20053f6eae90f946535a95225f522a">operator&gt;=</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() &gt;= rhs.str()</code>.</dd>
            <dt id="a61e19637671ad5c5856eafd5753e9b65">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a61e19637671ad5c5856eafd5753e9b65">operator&gt;=</a>(</span><span class="m-doc-wrap">const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; lhs,
              <a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs.str() &gt;= rhs</code>.</dd>
            <dt id="aa89096b9f6b364702858f2dc6734987a">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#aa89096b9f6b364702858f2dc6734987a">operator&gt;=</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if <code>lhs &gt;= rhs.str()</code>.</dd>
          </dl>
        </section>
        <section id="iteration">
          <h2><a href="#iteration">Iteration</a></h2>
          <dl class="m-doc">
            <dt id="a38a33d5010936195ac2083e428165512">
              using <a class="m-doc-self" href="#a38a33d5010936195ac2083e428165512">const_iterator</a> = const char*
            </dt>
            <dd>A const iterator for iterating over the characters in the key.</dd>
            <dt id="a40c42bc323383db54972b5752b9ad4dd">
              using <a class="m-doc-self" href="#a40c42bc323383db54972b5752b9ad4dd">iterator</a> = <a class="m-doc" href="#a38a33d5010936195ac2083e428165512">const_<wbr/>iterator</a>
            </dt>
            <dd>A const iterator for iterating over the characters in the key.</dd>
            <dt id="ab1691956be4ffe1c604e8e66acdc237e">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#ab1691956be4ffe1c604e8e66acdc237e">begin</a>(</span><span class="m-doc-wrap">) const →  <a class="m-doc" href="#a38a33d5010936195ac2083e428165512">const_<wbr/>iterator</a> <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns an iterator to the first character in the key's backing string.</dd>
            <dt id="a9b37a10b4aff1e6e7902301789f579c8">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a9b37a10b4aff1e6e7902301789f579c8">end</a>(</span><span class="m-doc-wrap">) const →  <a class="m-doc" href="#a38a33d5010936195ac2083e428165512">const_<wbr/>iterator</a> <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns an iterator to one-past-the-last character in the key's backing string.</dd>
          </dl>
        </section>
        <section id="metadata">
          <h2><a href="#metadata">Metadata</a></h2>
          <dl class="m-doc">
            <dt id="a04ef96a69462901507fc600bde6f63b4">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a04ef96a69462901507fc600bde6f63b4">source</a>(</span><span class="m-doc-wrap">) const →  const <a class="m-doc" href="structtoml_1_1source__region.html">source_<wbr/>region</a>&amp; <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns the <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source region</a> responsible for specifying this key during parsing.</dd>
          </dl>
        </section>
        <section id="string-operations">
          <h2><a href="#string-operations">String operations</a></h2>
          <dl class="m-doc">
            <dt id="a498a80bc18677cf967aec123dc1e36d5">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a498a80bc18677cf967aec123dc1e36d5">data</a>(</span><span class="m-doc-wrap">) const →  const char* <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns a pointer to the start of the key's underlying string.</dd>
            <dt id="a2baa48f26dac4a10a8328706f9386417">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a2baa48f26dac4a10a8328706f9386417">empty</a>(</span><span class="m-doc-wrap">) const →  bool <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns true if the key's underlying string is empty.</dd>
            <dt id="a5ffa3226fa66f1be190178572a87a000">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a5ffa3226fa66f1be190178572a87a000">length</a>(</span><span class="m-doc-wrap">) const →  <a class="m-doc poxy-injected poxy-external poxy-cppreference" href="https://en.cppreference.com/w/cpp/types/size_t" target="_blank">size_t</a> <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns the length of the key's underlying string.</dd>
            <dt id="a0f580806c0894ea820c533a9f6e0fa91">
              <span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a0f580806c0894ea820c533a9f6e0fa91">operator std::string_view</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns a view of the key's underlying string.</dd>
            <dt id="a0ca779e816081627f78965683182d4dc">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a0ca779e816081627f78965683182d4dc">str</a>(</span><span class="m-doc-wrap">) const →  <a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>string_view</a> <span class="m-label m-flat m-success">noexcept</span></span>
            </dt>
            <dd>Returns a view of the key's underlying string.</dd>
          </dl>
        </section>
        <section id="friends">
          <h2><a href="#friends">Friends</a></h2>
          <dl class="m-doc">
            <dt id="a7a7fac117898b85b48d9587be77f6893">
              <span class="m-doc-wrap-bumper">auto <a class="m-doc-self" href="#a7a7fac117898b85b48d9587be77f6893">operator&lt;&lt;</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html" target="_blank">std::<wbr/>ostream</a>&amp; lhs,
              const <a class="m-doc" href="classtoml_1_1key.html">key</a>&amp; rhs) →  <a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html" target="_blank">std::<wbr/>ostream</a>&amp;</span>
            </dt>
            <dd>Prints the key's underlying string out to the stream.</dd>
          </dl>
        </section>
        <section>
          <h2>Function documentation</h2>
          <section class="m-doc-details" id="a67cfed717c84773ab3fe6ec1b7936fa7"><div>
            <h3>
              <span class="m-doc-wrap-bumper"> <span class="m-doc-details-prefix">toml::<wbr/>key::<wbr/></span></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#a67cfed717c84773ab3fe6ec1b7936fa7">key</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>wstring_view</a> k,
              <a class="m-doc" href="structtoml_1_1source__region.html">source_<wbr/>region</a>&amp;&amp; src = {}) <span class="m-label m-info">explicit</span> </span></span>
            </h3>
            <p>Constructs a key from a wide string view and <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source region</a>.</p>
<aside class="m-block m-special"><h4>Conditional availability </h4><p>This constructor is only available when <a class="m-doc" href="group__configuration.html#ga94867db67c98e0e9d4fbb70690951fbf">TOML_<wbr/>ENABLE_<wbr/>WINDOWS_<wbr/>COMPAT</a> is enabled.</p></aside>
          </div></section>
          <section class="m-doc-details" id="aba2cb69db8cae7cbc60899a0ee7618d3"><div>
            <h3>
              <span class="m-doc-wrap-bumper"> <span class="m-doc-details-prefix">toml::<wbr/>key::<wbr/></span></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a class="m-doc-self" href="#aba2cb69db8cae7cbc60899a0ee7618d3">key</a>(</span><span class="m-doc-wrap"><a class="m-doc-external poxy-cppreference poxy-external" href="http://en.cppreference.com/w/cpp/string/basic_string_view.html" target="_blank">std::<wbr/>wstring_view</a> k,
              const <a class="m-doc" href="structtoml_1_1source__region.html">source_<wbr/>region</a>&amp; src) <span class="m-label m-info">explicit</span> </span></span>
            </h3>
            <p>Constructs a key from a wide string and <a class="m-doc poxy-injected" href="structtoml_1_1source__region.html">source region</a>.</p>
<aside class="m-block m-special"><h4>Conditional availability </h4><p>This constructor is only available when <a class="m-doc" href="group__configuration.html#ga94867db67c98e0e9d4fbb70690951fbf">TOML_<wbr/>ENABLE_<wbr/>WINDOWS_<wbr/>COMPAT</a> is enabled.</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-v2.js"></script><script>install_mcss_search_shim();</script>
<script async="async" src="searchdata-v2.js"></script>
<footer><nav>
  <div class="m-container">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        
<a class="poxy-external" href="https://github.com/marzer/tomlplusplus" target="_blank">GitHub</a>
• <a class="poxy-external" href="https://github.com/marzer/tomlplusplus/issues" target="_blank">Report an issue</a>
• <a class="sponsor poxy-external" href="https://github.com/sponsors/marzer" target="_blank">Become a sponsor</a>
• <a href="poxy_changelog.html">Changelog</a>
• <a class="poxy-external" href="https://github.com/marzer/tomlplusplus/blob/master/LICENSE" target="_blank">License</a>
• <a download="" href="toml++.tagfile.xml" target="_blank" type="text/xml">Doxygen tagfile</a>
<br/><br/>
Site generated using <a class="poxy-external" href="https://github.com/marzer/poxy/" target="_blank">Poxy</a>

      </div>
    </div>
  </div>
</nav></footer>


</body></html>