diff --git a/include/boost/geometry/index/rtree.hpp b/include/boost/geometry/index/rtree.hpp index a66c74cae..6836d5b1d 100644 --- a/include/boost/geometry/index/rtree.hpp +++ b/include/boost/geometry/index/rtree.hpp @@ -590,9 +590,9 @@ public: } /*! - \brief Insert an object of type convertible to value_type or a range of values to the index. + \brief Insert a value created using convertible object or a range of values to the index. - \param val_conv_or_rng An object of type convertible to value_type or a range of values. + \param conv_or_rng An object of type convertible to value_type or a range of values. \par Throws \li If Value copy constructor or copy assignment throws. @@ -604,15 +604,15 @@ public: elements must not be inserted or removed. Other operations are allowed however some of them may return invalid data. */ - template - inline void insert(ValueConvertibleOrRange const& val_conv_or_rng) + template + inline void insert(ConvertibleOrRange const& conv_or_rng) { typedef boost::mpl::bool_ < - boost::is_convertible::value + boost::is_convertible::value > is_conv_t; - this->insert_dispatch(val_conv_or_rng, is_conv_t()); + this->insert_dispatch(conv_or_rng, is_conv_t()); } /*! @@ -673,13 +673,13 @@ public: } /*! - \brief Remove an object of type convertible to value_type or a range of values from the container. + \brief Remove value corresponding to an object convertible to it or a range of values from the container. In contrast to the \c std::set or std::map erase() method it removes values equal to these passed as a range. Furthermore, this method removes only one value for each one passed in the range, not all equal values. - \param val_conv_or_rng The object of type convertible to value_type or a range of values. + \param conv_or_rng The object of type convertible to value_type or a range of values. \return The number of removed values. @@ -693,15 +693,15 @@ public: elements must not be inserted or removed. Other operations are allowed however some of them may return invalid data. */ - template - inline size_type remove(ValueConvertibleOrRange const& val_conv_or_rng) + template + inline size_type remove(ConvertibleOrRange const& conv_or_rng) { typedef boost::mpl::bool_ < - boost::is_convertible::value + boost::is_convertible::value > is_conv_t; - return this->remove_dispatch(val_conv_or_rng, is_conv_t()); + return this->remove_dispatch(conv_or_rng, is_conv_t()); } /*! @@ -1346,7 +1346,7 @@ private: } /*! - \brief Insert a value-convertible object into the index. + \brief Insert a value corresponding to convertible object into the index. \param val_conv The object convertible to value. @@ -1388,9 +1388,9 @@ private: } /*! - \brief Remove a value-convertible object from the index. + \brief Remove a value corresponding to convertible object from the index. - \param val_conv The value which will be removed from the container. + \param val_conv The object convertible to value. \par Exception-safety basic @@ -1533,7 +1533,8 @@ It calls rtree::insert(value_type const&). \param v The value which will be stored in the index. */ template -inline void insert(rtree & tree, Value const& v) +inline void insert(rtree & tree, + Value const& v) { tree.insert(v); } @@ -1549,26 +1550,30 @@ It calls rtree::insert(Iterator, Iterator). \param first The beginning of the range of values. \param last The end of the range of values. */ -template -inline void insert(rtree & tree, Iterator first, Iterator last) +template +inline void insert(rtree & tree, + Iterator first, Iterator last) { tree.insert(first, last); } /*! -\brief Insert a range of values to the index. +\brief Insert a value created using convertible object or a range of values to the index. -It calls rtree::insert(Range const&). +It calls rtree::insert(ConvertibleOrRange const&). \ingroup rtree_functions -\param tree The spatial index. -\param rng The range of values. +\param tree The spatial index. +\param conv_or_rng The object of type convertible to value_type or a range of values. */ -template -inline void insert(rtree & tree, Range const& rng) +template +inline void insert(rtree & tree, + ConvertibleOrRange const& conv_or_rng) { - tree.insert(rng); + tree.insert(conv_or_rng); } /*! @@ -1588,7 +1593,8 @@ It calls rtree::remove(value_type const&). */ template inline typename rtree::size_type -remove(rtree & tree, Value const& v) +remove(rtree & tree, + Value const& v) { return tree.remove(v); } @@ -1611,34 +1617,39 @@ It calls rtree::remove(Iterator, Iterator). \return The number of removed values. */ -template +template inline typename rtree::size_type -remove(rtree & tree, Iterator first, Iterator last) +remove(rtree & tree, + Iterator first, Iterator last) { return tree.remove(first, last); } /*! -\brief Remove a range of values from the container. +\brief Remove a value corresponding to an object convertible to it or a range of values from the container. -Remove a range of values from the container. In contrast to the \c std::set or std::map erase() method +Remove a value corresponding to an object convertible to it or a range of values from the container. +In contrast to the \c std::set or std::map erase() method it removes values equal to these passed as a range. Furthermore this method removes only one value for each one passed in the range, not all equal values. -It calls rtree::remove(Range const&). +It calls rtree::remove(ConvertibleOrRange const&). \ingroup rtree_functions -\param tree The spatial index. -\param rng The range of values. +\param tree The spatial index. +\param conv_or_rng The object of type convertible to value_type or the range of values. \return The number of removed values. */ -template +template inline typename rtree::size_type -remove(rtree & tree, Range const& rng) +remove(rtree & tree, + ConvertibleOrRange const& conv_or_rng) { - return tree.remove(rng); + return tree.remove(conv_or_rng); } /*!