/
usr
/
include
/
boost
/
range
/
detail
/
/usr/include/boost/range/detail
mkdir
upload
Name
Size
Mode
Actions
any_iterator.hpp
19467
0644
edit
dl
rm
any_iterator_buffer.hpp
2736
0644
edit
dl
rm
any_iterator_interface.hpp
10095
0644
edit
dl
rm
any_iterator_wrapper.hpp
21359
0644
edit
dl
rm
collection_traits.hpp
8505
0644
edit
dl
rm
collection_traits_detail.hpp
14471
0644
edit
dl
rm
combine_cxx03.hpp
2390
0644
edit
dl
rm
combine_cxx11.hpp
1048
0644
edit
dl
rm
combine_no_rvalue.hpp
2493
0644
edit
dl
rm
combine_rvalue.hpp
1183
0644
edit
dl
rm
common.hpp
6660
0644
edit
dl
rm
default_constructible_unary_fn.hpp
2038
0644
edit
dl
rm
demote_iterator_traversal_tag.hpp
5440
0644
edit
dl
rm
difference_type.hpp
3162
0644
edit
dl
rm
empty.hpp
3171
0644
edit
dl
rm
extract_optional_type.hpp
2018
0644
edit
dl
rm
has_member_size.hpp
1527
0644
edit
dl
rm
implementation_help.hpp
3177
0644
edit
dl
rm
join_iterator.hpp
10945
0644
edit
dl
rm
less.hpp
472
0644
edit
dl
rm
microsoft.hpp
28928
0644
edit
dl
rm
misc_concept.hpp
822
0644
edit
dl
rm
msvc_has_iterator_workaround.hpp
3612
0644
edit
dl
rm
range_return.hpp
6182
0644
edit
dl
rm
safe_bool.hpp
2067
0644
edit
dl
rm
sfinae.hpp
2699
0644
edit
dl
rm
sizer.hpp
946
0644
edit
dl
rm
str_types.hpp
813
0644
edit
dl
rm
Edit:
/usr/include/boost/range/detail/range_return.hpp
(6182B)
// Copyright Neil Groves 2009. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_DETAIL_RANGE_RETURN_HPP_INCLUDED #define BOOST_RANGE_DETAIL_RANGE_RETURN_HPP_INCLUDED #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/iterator_range.hpp> #include <boost/next_prior.hpp> namespace boost { enum range_return_value { // (*) indicates the most common values return_found, // only the found resulting iterator (*) return_next, // next(found) iterator return_prior, // prior(found) iterator return_begin_found, // [begin, found) range (*) return_begin_next, // [begin, next(found)) range return_begin_prior, // [begin, prior(found)) range return_found_end, // [found, end) range (*) return_next_end, // [next(found), end) range return_prior_end, // [prior(found), end) range return_begin_end // [begin, end) range }; template< class SinglePassRange, range_return_value > struct range_return { typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type; static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found, SinglePassRange& rng) { return type(found, boost::end(rng)); } }; template< class SinglePassRange > struct range_return< SinglePassRange, return_found > { typedef BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type type; static type pack(type found, SinglePassRange&) { return found; } }; template< class SinglePassRange > struct range_return< SinglePassRange, return_next > { typedef BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type type; static type pack(type found, SinglePassRange& rng) { return found == boost::end(rng) ? found : boost::next(found); } }; template< class BidirectionalRange > struct range_return< BidirectionalRange, return_prior > { typedef BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type type; static type pack(type found, BidirectionalRange& rng) { return found == boost::begin(rng) ? found : boost::prior(found); } }; template< class SinglePassRange > struct range_return< SinglePassRange, return_begin_found > { typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type; static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found, SinglePassRange& rng) { return type(boost::begin(rng), found); } }; template< class SinglePassRange > struct range_return< SinglePassRange, return_begin_next > { typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type; static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found, SinglePassRange& rng) { return type( boost::begin(rng), found == boost::end(rng) ? found : boost::next(found) ); } }; template< class BidirectionalRange > struct range_return< BidirectionalRange, return_begin_prior > { typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type > type; static type pack(BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type found, BidirectionalRange& rng) { return type( boost::begin(rng), found == boost::begin(rng) ? found : boost::prior(found) ); } }; template< class SinglePassRange > struct range_return< SinglePassRange, return_found_end > { typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type; static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found, SinglePassRange& rng) { return type(found, boost::end(rng)); } }; template< class SinglePassRange > struct range_return< SinglePassRange, return_next_end > { typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type; static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found, SinglePassRange& rng) { return type( found == boost::end(rng) ? found : boost::next(found), boost::end(rng) ); } }; template< class BidirectionalRange > struct range_return< BidirectionalRange, return_prior_end > { typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type > type; static type pack(BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type found, BidirectionalRange& rng) { return type( found == boost::begin(rng) ? found : boost::prior(found), boost::end(rng) ); } }; template< class SinglePassRange > struct range_return< SinglePassRange, return_begin_end > { typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type; static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type, SinglePassRange& rng) { return type(boost::begin(rng), boost::end(rng)); } }; } #endif // include guard
Save
cmd:
run