forked from boostorg/intrusive
Add make_iterator_advance make_iterator_uadvance
This commit is contained in:
@@ -213,6 +213,14 @@ BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::random
|
||||
it += n;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::random_access_iterator_tag, InputIt>::type
|
||||
make_iterator_advance(InputIt it, Distance n)
|
||||
{
|
||||
(iterator_advance)(it, n);
|
||||
return it;
|
||||
}
|
||||
|
||||
template<class It>
|
||||
BOOST_INTRUSIVE_FORCEINLINE
|
||||
void iterator_uadvance(It& it, typename iter_size<It>::type n)
|
||||
@@ -220,6 +228,14 @@ BOOST_INTRUSIVE_FORCEINLINE
|
||||
(iterator_advance)(it, (typename iterator_traits<It>::difference_type)n);
|
||||
}
|
||||
|
||||
template<class It>
|
||||
BOOST_INTRUSIVE_FORCEINLINE
|
||||
It make_iterator_uadvance(It it, typename iter_size<It>::type n)
|
||||
{
|
||||
(iterator_uadvance)(it, n);
|
||||
return it;
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
// iterator_distance
|
||||
////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user