1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>end()</title> 5<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../../../index.html" title="Chapter 1. Geometry"> 8<link rel="up" href="../boost__geometry__index__rtree.html" title="boost::geometry::index::rtree"> 9<link rel="prev" href="begin__.html" title="begin()"> 10<link rel="next" href="size__.html" title="size()"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="begin__.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost__geometry__index__rtree.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="size__.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h5 class="title"> 27<a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a5c8b735055ac44dd1d354359c5a0b910"></a><a class="link" href="end__.html" title="end()">end()</a> 28</h5></div></div></div> 29<p> 30 <a class="indexterm" name="idm45635675428224"></a> 31Returns the iterator pointing at the end of the rtree values range. 32 </p> 33<h6> 34<a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.h0"></a> 35 <span class="phrase"><a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.description"></a></span><a class="link" href="end__.html#geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.description">Description</a> 36 </h6> 37<p> 38 This method returns the iterator which may be compared with the iterator 39 returned by <a class="link" href="begin__.html#classboost_1_1geometry_1_1index_1_1rtree_1a4efdce77c31a940642d824f3cabe2d31">begin()</a> 40 in order to check if the iteration has ended. 41 </p> 42<h6> 43<a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.h1"></a> 44 <span class="phrase"><a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.synopsis"></a></span><a class="link" href="end__.html#geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.synopsis">Synopsis</a> 45 </h6> 46<pre class="programlisting"><code class="literal"><a class="link" href="../boost__geometry__index__rtree.html#classboost_1_1geometry_1_1index_1_1rtree_1a701f65f0d6cf2e8b7be7f1c4b8fb7fde">const_iterator</a></code> <code class="computeroutput"><span class="identifier">end</span></code><code class="computeroutput"><span class="special">()</span></code> 47</pre> 48<h6> 49<a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.h2"></a> 50 <span class="phrase"><a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.modifier_s_"></a></span><a class="link" href="end__.html#geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.modifier_s_">Modifier(s)</a> 51 </h6> 52<p> 53</p> 54<pre class="programlisting"><span class="keyword">const</span></pre> 55<p> 56 </p> 57<h6> 58<a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.h3"></a> 59 <span class="phrase"><a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.returns"></a></span><a class="link" href="end__.html#geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.returns">Returns</a> 60 </h6> 61<p> 62 The iterator pointing at the end of the range. 63 </p> 64<h6> 65<a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.h4"></a> 66 <span class="phrase"><a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.example"></a></span><a class="link" href="end__.html#geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.example">Example</a> 67 </h6> 68<p> 69</p> 70<pre class="programlisting"><span class="keyword">for</span> <span class="special">(</span> <span class="identifier">Rtree</span><span class="special">::</span><span class="identifier">const_iterator</span> <span class="identifier">it</span> <span class="special">=</span> <span class="identifier">tree</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">;</span> <span class="identifier">it</span> <span class="special">!=</span> <span class="identifier">tree</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">;</span> <span class="special">++</span><span class="identifier">it</span> <span class="special">)</span> 71<span class="special">{</span> 72 <span class="comment">// do something with value</span> 73<span class="special">}</span> 74 75<span class="comment">// C++11 (lambda expression)</span> 76<span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">tree</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">tree</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="special">[](</span><span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">val</span><span class="special">){</span> 77 <span class="comment">// do something with value</span> 78<span class="special">})</span> 79</pre> 80<p> 81 </p> 82<h6> 83<a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.h5"></a> 84 <span class="phrase"><a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.iterator_category"></a></span><a class="link" href="end__.html#geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.iterator_category">Iterator 85 category</a> 86 </h6> 87<p> 88 ForwardIterator 89 </p> 90<h6> 91<a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.h6"></a> 92 <span class="phrase"><a name="geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.throws"></a></span><a class="link" href="end__.html#geometry.reference.spatial_indexes.boost__geometry__index__rtree.end__.throws">Throws</a> 93 </h6> 94<p> 95 Nothing. 96 </p> 97<div class="warning"><table border="0" summary="Warning"> 98<tr> 99<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../../../../doc/src/images/warning.png"></td> 100<th align="left">Warning</th> 101</tr> 102<tr><td align="left" valign="top"><p> 103 The modification of the rtree may invalidate the iterators. 104 </p></td></tr> 105</table></div> 106</div> 107<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 108<td align="left"></td> 109<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam 110 Wulkiewicz, Oracle and/or its affiliates<p> 111 Distributed under the Boost Software License, Version 1.0. (See accompanying 112 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 113 </p> 114</div></td> 115</tr></table> 116<hr> 117<div class="spirit-nav"> 118<a accesskey="p" href="begin__.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost__geometry__index__rtree.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="size__.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 119</div> 120</body> 121</html> 122