1 // Boost.Range library 2 // 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) 7 // 8 // For more information, see http://www.boost.org/libs/range/ 9 // 10 #ifndef BOOST_RANGE_DETAIL_COMBINE_CXX03_HPP 11 #define BOOST_RANGE_DETAIL_COMBINE_CXX03_HPP 12 13 #ifndef BOOST_RANGE_MIN_COMBINE_ARGS 14 #define BOOST_RANGE_MIN_COMBINE_ARGS 2 15 #endif 16 17 #ifndef BOOST_RANGE_MAX_COMBINE_ARGS 18 #define BOOST_RANGE_MAX_COMBINE_ARGS 5 19 #endif 20 21 #include <boost/config.hpp> 22 #include <boost/iterator/zip_iterator.hpp> 23 #include <boost/preprocessor/arithmetic/dec.hpp> 24 #include <boost/preprocessor/arithmetic/div.hpp> 25 #include <boost/preprocessor/arithmetic/mul.hpp> 26 #include <boost/preprocessor/control/if.hpp> 27 #include <boost/preprocessor/control/while.hpp> 28 #include <boost/preprocessor/facilities/empty.hpp> 29 #include <boost/preprocessor/facilities/identity.hpp> 30 #include <boost/preprocessor/iteration/local.hpp> 31 #include <boost/preprocessor/repetition/enum.hpp> 32 #include <boost/preprocessor/repetition/enum_params.hpp> 33 #include <boost/preprocessor/repetition/repeat.hpp> 34 #include <boost/preprocessor/tuple/elem.hpp> 35 #include <boost/range/iterator_range_core.hpp> 36 #include <boost/type_traits/remove_reference.hpp> 37 38 namespace boost 39 { 40 41 namespace range 42 { 43 44 #define BOOST_RANGE_combined_seq(z, n, data) boost::data(BOOST_PP_CAT(r,n)) 45 46 #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES 47 48 #include <boost/range/detail/combine_no_rvalue.hpp> 49 50 #else // by using rvalue references we avoid requiring 2^n overloads. 51 52 #include <boost/range/detail/combine_rvalue.hpp> 53 54 #endif 55 56 #define BOOST_PP_LOCAL_MACRO(n) BOOST_RANGE_combine(~,n,~) 57 #define BOOST_PP_LOCAL_LIMITS (BOOST_RANGE_MIN_COMBINE_ARGS, \ 58 BOOST_RANGE_MAX_COMBINE_ARGS) 59 #include BOOST_PP_LOCAL_ITERATE() 60 61 } // namespace range 62 63 using boost::range::combine; 64 65 } // namespace boost 66 67 #endif // include guard 68 69 #undef BOOST_RANGE_combined_seq 70 #undef BOOST_RANGE_combined_exp_pred 71 #undef BOOST_RANGE_combined_exp_op 72 #undef BOOST_RANGE_combined_exp 73 #undef BOOST_RANGE_combined_bitset_pred 74 #undef BOOST_RANGE_combined_bitset_op 75 #undef BOOST_RANGE_combined_bitset 76 #undef BOOST_RANGE_combined_range_iterator 77 #undef BOOST_RANGE_combined_args 78 #undef BOOST_RANGE_combine_impl 79 #undef BOOST_RANGE_combine 80