renderd7/classnlohmann_1_1detail_1_1invalid__iterator.html
2022-04-13 18:07:13 +00:00

150 lines
13 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Renderd7-nightly: nlohmann::detail::invalid_iterator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="docsn.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Renderd7-nightly
&#160;<span id="projectnumber">v0.7.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classnlohmann_1_1detail_1_1invalid__iterator.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="classnlohmann_1_1detail_1_1invalid__iterator-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">nlohmann::detail::invalid_iterator Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>exception indicating errors with iterators
<a href="classnlohmann_1_1detail_1_1invalid__iterator.html#details">More...</a></p>
<p><code>#include &lt;json.hpp&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for nlohmann::detail::invalid_iterator:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center">
<img src="classnlohmann_1_1detail_1_1invalid__iterator.png" usemap="#nlohmann::detail::invalid_5Fiterator_map" alt=""/>
<map id="nlohmann::detail::invalid_5Fiterator_map" name="nlohmann::detail::invalid_5Fiterator_map">
<area href="classnlohmann_1_1detail_1_1exception.html" title="general exception of the basic_json class" alt="nlohmann::detail::exception" shape="rect" coords="0,0,192,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_methods_classnlohmann_1_1detail_1_1exception"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classnlohmann_1_1detail_1_1exception')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classnlohmann_1_1detail_1_1exception.html">nlohmann::detail::exception</a></td></tr>
<tr class="memitem:a11fe48748e811531614c84883b00ccd5 inherit pub_methods_classnlohmann_1_1detail_1_1exception"><td class="memItemLeft" align="right" valign="top"><a id="a11fe48748e811531614c84883b00ccd5"></a>
const JSON_HEDLEY_RETURNS_NON_NULL char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1detail_1_1exception.html#a11fe48748e811531614c84883b00ccd5">what</a> () const noexcept override</td></tr>
<tr class="memdesc:a11fe48748e811531614c84883b00ccd5 inherit pub_methods_classnlohmann_1_1detail_1_1exception"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the explanatory string <br /></td></tr>
<tr class="separator:a11fe48748e811531614c84883b00ccd5 inherit pub_methods_classnlohmann_1_1detail_1_1exception"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_attribs_classnlohmann_1_1detail_1_1exception"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_classnlohmann_1_1detail_1_1exception')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="classnlohmann_1_1detail_1_1exception.html">nlohmann::detail::exception</a></td></tr>
<tr class="memitem:a0d4589a3fb54e81646d986c05efa3b9a inherit pub_attribs_classnlohmann_1_1detail_1_1exception"><td class="memItemLeft" align="right" valign="top"><a id="a0d4589a3fb54e81646d986c05efa3b9a"></a>
const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1detail_1_1exception.html#a0d4589a3fb54e81646d986c05efa3b9a">id</a></td></tr>
<tr class="memdesc:a0d4589a3fb54e81646d986c05efa3b9a inherit pub_attribs_classnlohmann_1_1detail_1_1exception"><td class="mdescLeft">&#160;</td><td class="mdescRight">the id of the exception <br /></td></tr>
<tr class="separator:a0d4589a3fb54e81646d986c05efa3b9a inherit pub_attribs_classnlohmann_1_1detail_1_1exception"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>exception indicating errors with iterators </p>
<p>This exception is thrown if iterators passed to a library function do not match the expected semantics.</p>
<p>Exceptions have ids 2xx.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">name / id </th><th class="markdownTableHeadNone">example message </th><th class="markdownTableHeadNone">description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.201 </td><td class="markdownTableBodyNone">iterators are not compatible </td><td class="markdownTableBodyNone">The iterators passed to constructor basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, the range (<em>first</em>, <em>last</em>) is invalid. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.202 </td><td class="markdownTableBodyNone">iterator does not fit current value </td><td class="markdownTableBodyNone">In an erase or insert function, the passed iterator <em>pos</em> does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.203 </td><td class="markdownTableBodyNone">iterators do not fit current value </td><td class="markdownTableBodyNone">Either iterator passed to function erase(IteratorType first, IteratorType last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.204 </td><td class="markdownTableBodyNone">iterators out of range </td><td class="markdownTableBodyNone">When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (begin(), end()), because this is the only way the single stored value is expressed. All other ranges are invalid. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.205 </td><td class="markdownTableBodyNone">iterator out of range </td><td class="markdownTableBodyNone">When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the begin() iterator, because it is the only way to address the stored value. All other iterators are invalid. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.206 </td><td class="markdownTableBodyNone">cannot construct with iterators from null </td><td class="markdownTableBodyNone">The iterators passed to constructor basic_json(InputIT first, InputIT last) belong to a JSON null value and hence to not define a valid range. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.207 </td><td class="markdownTableBodyNone">cannot use key() for non-object iterators </td><td class="markdownTableBodyNone">The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.208 </td><td class="markdownTableBodyNone">cannot use operator[] for object iterators </td><td class="markdownTableBodyNone">The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.209 </td><td class="markdownTableBodyNone">cannot use offsets with object iterators </td><td class="markdownTableBodyNone">The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.210 </td><td class="markdownTableBodyNone">iterators do not fit </td><td class="markdownTableBodyNone">The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (<em>first</em>, <em>last</em>) is invalid. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.211 </td><td class="markdownTableBodyNone">passed iterators may not belong to container </td><td class="markdownTableBodyNone">The iterator range passed to the insert function must not be a subrange of the container to insert to. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.212 </td><td class="markdownTableBodyNone">cannot compare iterators of different containers </td><td class="markdownTableBodyNone">When two iterators are compared, they must belong to the same container. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.213 </td><td class="markdownTableBodyNone">cannot compare order of object iterators </td><td class="markdownTableBodyNone">The order of object iterators cannot be compared, because JSON objects are unordered. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.214 </td><td class="markdownTableBodyNone">cannot get value </td><td class="markdownTableBodyNone">Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to begin(). </td></tr>
</table>
<p>@liveexample{The following code shows how an <code><a class="el" href="classnlohmann_1_1detail_1_1invalid__iterator.html" title="exception indicating errors with iterators">invalid_iterator</a></code> exception can be caught.,<a class="el" href="classnlohmann_1_1detail_1_1invalid__iterator.html" title="exception indicating errors with iterators">invalid_iterator</a>}</p>
<dl class="section see"><dt>See also</dt><dd>- <a class="el" href="classnlohmann_1_1detail_1_1exception.html">exception</a> for the base class of the library exceptions </dd>
<dd>
- <a class="el" href="classnlohmann_1_1detail_1_1parse__error.html">parse_error</a> for exceptions indicating a parse error </dd>
<dd>
- <a class="el" href="classnlohmann_1_1detail_1_1type__error.html">type_error</a> for exceptions indicating executing a member function with a wrong type </dd>
<dd>
- <a class="el" href="classnlohmann_1_1detail_1_1out__of__range.html">out_of_range</a> for exceptions indicating access out of the defined range </dd>
<dd>
- <a class="el" href="classnlohmann_1_1detail_1_1other__error.html">other_error</a> for exceptions indicating other library errors</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacenlohmann.html">nlohmann</a></li><li class="navelem"><a class="el" href="namespacenlohmann_1_1detail.html">detail</a></li><li class="navelem"><a class="el" href="classnlohmann_1_1detail_1_1invalid__iterator.html">invalid_iterator</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
</ul>
</div>
</body>
</html>