3 // Copyright Neil Groves 2014. Use, modification and
4 // distribution is subject to the Boost Software License, Version
5 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
8 // For more information, see http://www.boost.org/libs/range/
10 #define BOOST_RANGE_combined_args(z, n, i) \
11 BOOST_PP_CAT(R, n)&& BOOST_PP_CAT(r, n)
13 #define BOOST_RANGE_combined_range_iterator(z, n, i) \
14 typename range_iterator< \
15 typename remove_reference<BOOST_PP_CAT(R,n)>::type \
19 #define BOOST_RANGE_combine(z, n, data) \
20 template <BOOST_PP_ENUM_PARAMS(n, typename R)> \
21 inline range::combined_range< \
22 tuple<BOOST_PP_ENUM(n, BOOST_RANGE_combined_range_iterator, ~)> \
24 combine(BOOST_PP_ENUM(n, BOOST_RANGE_combined_args, ~)) \
27 BOOST_PP_ENUM(n, BOOST_RANGE_combined_range_iterator, ~) \
29 return range::combined_range<rng_tuple_t>( \
30 rng_tuple_t(BOOST_PP_ENUM(n, BOOST_RANGE_combined_seq, begin)), \
31 rng_tuple_t(BOOST_PP_ENUM(n, BOOST_RANGE_combined_seq, end))); \