mirror of
https://github.com/nlohmann/json.git
synced 2024-11-23 22:19:02 +08:00
Deployed c883fb0f1
with MkDocs version: 1.5.3
This commit is contained in:
parent
a87fd638da
commit
b014c90f94
@ -286,7 +286,7 @@
|
|||||||
<span class=w> </span><span class=c1>// try to read from a nonexisting key using string_view</span>
|
<span class=w> </span><span class=c1>// try to read from a nonexisting key using string_view</span>
|
||||||
<span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>cout</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>object</span><span class=p>.</span><span class=n>at</span><span class=p>(</span><span class=s>"the fast"</span><span class=n>sv</span><span class=p>)</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span><span class=p>;</span>
|
<span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>cout</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>object</span><span class=p>.</span><span class=n>at</span><span class=p>(</span><span class=s>"the fast"</span><span class=n>sv</span><span class=p>)</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span><span class=p>;</span>
|
||||||
<span class=w> </span><span class=p>}</span>
|
<span class=w> </span><span class=p>}</span>
|
||||||
<span class=w> </span><span class=k>catch</span><span class=w> </span><span class=p>(</span><span class=k>const</span><span class=w> </span><span class=n>json</span><span class=o>::</span><span class=n>out_of_range</span><span class=p>)</span>
|
<span class=w> </span><span class=k>catch</span><span class=w> </span><span class=p>(</span><span class=k>const</span><span class=w> </span><span class=n>json</span><span class=o>::</span><span class=n>out_of_range</span><span class=o>&</span><span class=w> </span><span class=n>e</span><span class=p>)</span>
|
||||||
<span class=w> </span><span class=p>{</span>
|
<span class=w> </span><span class=p>{</span>
|
||||||
<span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>cout</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"out of range"</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span><span class=p>;</span>
|
<span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>cout</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"out of range"</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span><span class=p>;</span>
|
||||||
<span class=w> </span><span class=p>}</span>
|
<span class=w> </span><span class=p>}</span>
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -36,7 +36,7 @@ int main()
|
|||||||
// try to read from a nonexisting key using string_view
|
// try to read from a nonexisting key using string_view
|
||||||
std::cout << object.at("the fast"sv) << '\n';
|
std::cout << object.at("the fast"sv) << '\n';
|
||||||
}
|
}
|
||||||
catch (const json::out_of_range)
|
catch (const json::out_of_range& e)
|
||||||
{
|
{
|
||||||
std::cout << "out of range" << '\n';
|
std::cout << "out of range" << '\n';
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
448
sitemap.xml
448
sitemap.xml
File diff suppressed because it is too large
Load Diff
BIN
sitemap.xml.gz
BIN
sitemap.xml.gz
Binary file not shown.
Loading…
Reference in New Issue
Block a user