1 #ifndef MPQC_RANGE_OPERATOR_HPP
2 #define MPQC_RANGE_OPERATOR_HPP
4 #include "mpqc/range.hpp"
5 #include "mpqc/range/tie.hpp"
7 #include <boost/tuple/tuple.hpp>
8 #include <boost/tuple/tuple_io.hpp>
10 #include <boost/preprocessor/repetition.hpp>
11 #include <boost/preprocessor/enum_params.hpp>
12 #include <boost/preprocessor/tuple.hpp>
17 #define MPQC_RANGE_CONST_OPERATOR(Z, N, DATA) \
18 template<BOOST_PP_ENUM_PARAMS(N, class _R)> \
19 BOOST_PP_TUPLE_ELEM(2, 0, DATA) \
20 operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, const _R, &r)) const { \
21 return BOOST_PP_TUPLE_ELEM(2, 1, DATA) \
22 (mpqc::detail::range_tie \
23 (boost::tie(BOOST_PP_ENUM_PARAMS(N, r)))); \
26 #define MPQC_RANGE_OPERATOR(Z, N, DATA) \
27 template<BOOST_PP_ENUM_PARAMS(N, class _R)> \
28 BOOST_PP_TUPLE_ELEM(2, 0, DATA) \
29 operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, const _R, &r)) { \
30 return BOOST_PP_TUPLE_ELEM(2, 1, DATA) \
31 (mpqc::detail::range_tie \
32 (boost::tie(BOOST_PP_ENUM_PARAMS(N, r)))); \
41 #define MPQC_RANGE_OPERATORS(N, Type, Function) \
42 BOOST_PP_REPEAT_FROM_TO(1, N, MPQC_RANGE_OPERATOR, (Type, Function))
45 #define MPQC_RANGE_CONST_OPERATORS(N, Type, Function) \
46 BOOST_PP_REPEAT_FROM_TO(1, N, MPQC_RANGE_CONST_OPERATOR, (Type, Function))
50 #endif // MPQC_RANGE_OPERATOR_HPP
Generated at Sun Jan 26 2020 23:24:01 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.