1 //  Copyright Neil Groves 2014. Use, modification and
2 //  distribution is subject to the Boost Software License, Version
3 //  1.0. (See accompanying file LICENSE_1_0.txt or copy at
4 //  http://www.boost.org/LICENSE_1_0.txt)
5 //
6 //
7 // For more information, see http://www.boost.org/libs/range/
8 //
9 #ifndef BOOST_RANGE_DETAIL_COMBINE_CXX11_HPP
10 #define BOOST_RANGE_DETAIL_COMBINE_CXX11_HPP
11 
12 #include <boost/range/iterator_range_core.hpp>
13 #include <boost/range/iterator.hpp>
14 #include <boost/range/begin.hpp>
15 #include <boost/range/end.hpp>
16 #include <boost/iterator/zip_iterator.hpp>
17 
18 namespace boost
19 {
20     namespace range
21     {
22 
23 template<typename... Ranges>
combine(Ranges &&...rngs)24 auto combine(Ranges&&... rngs) ->
25     combined_range<decltype(boost::make_tuple(boost::begin(rngs)...))>
26 {
27     return combined_range<decltype(boost::make_tuple(boost::begin(rngs)...))>(
28                 boost::make_tuple(boost::begin(rngs)...),
29                 boost::make_tuple(boost::end(rngs)...));
30 }
31 
32     } // namespace range
33 
34 using range::combine;
35 
36 } // namespace boost
37 
38 #endif // include guard
39