Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This is an older version of Boost and was released in 2017. The current version is 1.89.0.
Returns a query iterator pointing at the begin of the query range.
This method returns an iterator which may be used to perform iterative queries. For the information about predicates which may be passed to this method see query().
template<typename Predicates>const_query_iteratorqbegin(Predicates const &predicates)
const
|
Type |
Name |
Description |
|---|---|---|
|
|
|
Predicates. |
The iterator pointing at the begin of the query range.
for ( Rtree::const_query_iterator it = tree.qbegin(bgi::nearest(pt, 10000)) ; it != tree.qend() ; ++it ) { // do something with value if ( has_enough_nearest_values() ) break; } // C++11 (auto) for ( auto it = tree.qbegin(bgi::nearest(pt, 3)) ; it != tree.qend() ; ++it ) { // do something with value } // C++14 (generic lambda expression) std::for_each(tree.qbegin(bgi::nearest(pt, 3)), tree.qend(), [](auto const& val){ // do something with value });
ForwardIterator
If predicates copy throws. If allocation throws.
![]() |
Warning |
|---|---|
The modification of the rtree may invalidate the iterators. |