forked from boostorg/algorithm
Constructors, accepting a collection added
[SVN r23040]
This commit is contained in:
@ -96,6 +96,22 @@ namespace boost {
|
|||||||
increment();
|
increment();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
|
/*!
|
||||||
|
Construct new find_iterator for a given finder
|
||||||
|
and a collection.
|
||||||
|
*/
|
||||||
|
template<typename FinderT, typename CollectionT>
|
||||||
|
find_iterator(
|
||||||
|
CollectionT& Col,
|
||||||
|
FinderT Finder ) :
|
||||||
|
detail::find_iterator_base<IteratorT>(Finder,0),
|
||||||
|
m_Match(begin(Col),begin(Col)),
|
||||||
|
m_End(end(Col))
|
||||||
|
{
|
||||||
|
increment();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// iterator operations
|
// iterator operations
|
||||||
|
|
||||||
@ -162,7 +178,7 @@ namespace boost {
|
|||||||
FinderT Finder)
|
FinderT Finder)
|
||||||
{
|
{
|
||||||
return find_iterator<BOOST_STRING_TYPENAME result_iterator_of<CollectionT>::type>(
|
return find_iterator<BOOST_STRING_TYPENAME result_iterator_of<CollectionT>::type>(
|
||||||
Collection.begin(), Collection.end(), Finder);
|
begin(Collection), end(Collection), Finder);
|
||||||
}
|
}
|
||||||
|
|
||||||
// split iterator -----------------------------------------------//
|
// split iterator -----------------------------------------------//
|
||||||
@ -216,7 +232,7 @@ namespace boost {
|
|||||||
split_iterator() {}
|
split_iterator() {}
|
||||||
//! Copy constructor
|
//! Copy constructor
|
||||||
/*!
|
/*!
|
||||||
Construct a copy of the find_iterator
|
Construct a copy of the split_iterator
|
||||||
*/
|
*/
|
||||||
split_iterator( const split_iterator& Other ) :
|
split_iterator( const split_iterator& Other ) :
|
||||||
base_type(Other),
|
base_type(Other),
|
||||||
@ -226,7 +242,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
/*!
|
/*!
|
||||||
Construct new find_iterator for a given finder
|
Construct new split_iterator for a given finder
|
||||||
and a range.
|
and a range.
|
||||||
*/
|
*/
|
||||||
template<typename FinderT>
|
template<typename FinderT>
|
||||||
@ -241,6 +257,23 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
increment();
|
increment();
|
||||||
}
|
}
|
||||||
|
//! Constructor
|
||||||
|
/*!
|
||||||
|
Construct new split_iterator for a given finder
|
||||||
|
and a collection.
|
||||||
|
*/
|
||||||
|
template<typename FinderT, typename CollectionT>
|
||||||
|
split_iterator(
|
||||||
|
CollectionT& Col,
|
||||||
|
FinderT Finder ) :
|
||||||
|
detail::find_iterator_base<IteratorT>(Finder,0),
|
||||||
|
m_Match(begin(Col),begin(Col)),
|
||||||
|
m_Next(begin(Col)),
|
||||||
|
m_End(end(Col))
|
||||||
|
{
|
||||||
|
increment();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// iterator operations
|
// iterator operations
|
||||||
@ -312,7 +345,7 @@ namespace boost {
|
|||||||
FinderT Finder)
|
FinderT Finder)
|
||||||
{
|
{
|
||||||
return split_iterator<BOOST_STRING_TYPENAME result_iterator_of<CollectionT>::type>(
|
return split_iterator<BOOST_STRING_TYPENAME result_iterator_of<CollectionT>::type>(
|
||||||
Collection.begin(), Collection.end(), Finder);
|
begin(Collection), end(Collection), Finder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user