forked from boostorg/range
Boost.Range - removed unnecessary code from the sliced adaptor.
Added a unit test to test the use of a non-member function as a transform functor and composition of strided, sliced and transformed range adaptors. [SVN r61404]
This commit is contained in:
@ -38,17 +38,6 @@ namespace boost
|
||||
return boost::make_iterator_range( rng, t, u - boost::size(rng) );
|
||||
}
|
||||
|
||||
template< class RandomAccessRange >
|
||||
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type >
|
||||
slice( const RandomAccessRange& rng, std::size_t t, std::size_t u )
|
||||
{
|
||||
BOOST_ASSERT( t <= u && "error in slice indices" );
|
||||
BOOST_ASSERT( static_cast<std::size_t>(boost::size(rng)) >= u &&
|
||||
"second slice index out of bounds" );
|
||||
|
||||
return boost::make_iterator_range( rng, t, u - boost::size(rng) );
|
||||
}
|
||||
|
||||
template< class RandomAccessRange >
|
||||
inline iterator_range<
|
||||
BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type >
|
||||
@ -57,14 +46,6 @@ namespace boost
|
||||
return adaptors::slice( r, f.t, f.u );
|
||||
}
|
||||
|
||||
template< class RandomAccessRange >
|
||||
inline iterator_range<
|
||||
BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type >
|
||||
operator|( const RandomAccessRange& r, const sliced& f )
|
||||
{
|
||||
return adaptors::slice( r, f.t, f.u );
|
||||
}
|
||||
|
||||
} // namespace adaptors
|
||||
} // namespace boost
|
||||
|
||||
|
Reference in New Issue
Block a user