Brian Silverman | 598d029 | 2018-08-04 23:56:47 -0700 | [diff] [blame^] | 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 | #include <fstream> |
| 19 | |
| 20 | namespace boost |
| 21 | { |
| 22 | namespace range |
| 23 | { |
| 24 | |
| 25 | template<typename... Ranges> |
| 26 | auto combine(Ranges&&... rngs) -> |
| 27 | combined_range<decltype(boost::make_tuple(boost::begin(rngs)...))> |
| 28 | { |
| 29 | return combined_range<decltype(boost::make_tuple(boost::begin(rngs)...))>( |
| 30 | boost::make_tuple(boost::begin(rngs)...), |
| 31 | boost::make_tuple(boost::end(rngs)...)); |
| 32 | } |
| 33 | |
| 34 | } // namespace range |
| 35 | |
| 36 | using range::combine; |
| 37 | |
| 38 | } // namespace boost |
| 39 | |
| 40 | #endif // include guard |