Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/range/adaptor/reversed.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
10 | 10 |
11 #ifndef BOOST_RANGE_ADAPTOR_REVERSED_HPP | 11 #ifndef BOOST_RANGE_ADAPTOR_REVERSED_HPP |
12 #define BOOST_RANGE_ADAPTOR_REVERSED_HPP | 12 #define BOOST_RANGE_ADAPTOR_REVERSED_HPP |
13 | 13 |
14 #include <boost/range/iterator_range.hpp> | 14 #include <boost/range/iterator_range.hpp> |
15 #include <boost/range/concepts.hpp> | |
15 #include <boost/iterator/reverse_iterator.hpp> | 16 #include <boost/iterator/reverse_iterator.hpp> |
16 | 17 |
17 namespace boost | 18 namespace boost |
18 { | 19 { |
19 namespace range_detail | 20 namespace range_detail |
42 { } | 43 { } |
43 }; | 44 }; |
44 | 45 |
45 struct reverse_forwarder {}; | 46 struct reverse_forwarder {}; |
46 | 47 |
47 template< class BidirectionalRng > | 48 template< class BidirectionalRange > |
48 inline reversed_range<BidirectionalRng> | 49 inline reversed_range<BidirectionalRange> |
49 operator|( BidirectionalRng& r, reverse_forwarder ) | 50 operator|( BidirectionalRange& r, reverse_forwarder ) |
50 { | 51 { |
51 return reversed_range<BidirectionalRng>( r ); | 52 BOOST_RANGE_CONCEPT_ASSERT(( |
53 BidirectionalRangeConcept<BidirectionalRange>)); | |
54 | |
55 return reversed_range<BidirectionalRange>( r ); | |
52 } | 56 } |
53 | 57 |
54 template< class BidirectionalRng > | 58 template< class BidirectionalRange > |
55 inline reversed_range<const BidirectionalRng> | 59 inline reversed_range<const BidirectionalRange> |
56 operator|( const BidirectionalRng& r, reverse_forwarder ) | 60 operator|( const BidirectionalRange& r, reverse_forwarder ) |
57 { | 61 { |
58 return reversed_range<const BidirectionalRng>( r ); | 62 BOOST_RANGE_CONCEPT_ASSERT(( |
63 BidirectionalRangeConcept<const BidirectionalRange>)); | |
64 | |
65 return reversed_range<const BidirectionalRange>( r ); | |
59 } | 66 } |
60 | 67 |
61 } // 'range_detail' | 68 } // 'range_detail' |
62 | 69 |
63 using range_detail::reversed_range; | 70 using range_detail::reversed_range; |
72 | 79 |
73 template<class BidirectionalRange> | 80 template<class BidirectionalRange> |
74 inline reversed_range<BidirectionalRange> | 81 inline reversed_range<BidirectionalRange> |
75 reverse(BidirectionalRange& rng) | 82 reverse(BidirectionalRange& rng) |
76 { | 83 { |
84 BOOST_RANGE_CONCEPT_ASSERT(( | |
85 BidirectionalRangeConcept<BidirectionalRange>)); | |
86 | |
77 return reversed_range<BidirectionalRange>(rng); | 87 return reversed_range<BidirectionalRange>(rng); |
78 } | 88 } |
79 | 89 |
80 template<class BidirectionalRange> | 90 template<class BidirectionalRange> |
81 inline reversed_range<const BidirectionalRange> | 91 inline reversed_range<const BidirectionalRange> |
82 reverse(const BidirectionalRange& rng) | 92 reverse(const BidirectionalRange& rng) |
83 { | 93 { |
94 BOOST_RANGE_CONCEPT_ASSERT(( | |
95 BidirectionalRangeConcept<const BidirectionalRange>)); | |
96 | |
84 return reversed_range<const BidirectionalRange>(rng); | 97 return reversed_range<const BidirectionalRange>(rng); |
85 } | 98 } |
86 } // 'adaptors' | 99 } // 'adaptors' |
87 | 100 |
88 } // 'boost' | 101 } // 'boost' |