83 #define TUPLE(z,n,unused) \
84 template<BOOST_PP_ENUM_PARAMS( n, typename A)> \
85 struct tuple<BOOST_PP_ENUM_PARAMS(n,A)> { \
86 enum size_enum { size = n }; \
87 template<BOOST_PP_ENUM_PARAMS( n, typename AA)> \
88 explicit tuple( BOOST_PP_ENUM(n, RREF_PARAMS, unused ) )BOOST_PP_IF(n,:,BOOST_PP_EMPTY())BOOST_PP_ENUM( n, ILIST_PARAMS,unused){} \
89 tuple( const tuple& t )BOOST_PP_IF(n,:,BOOST_PP_EMPTY())BOOST_PP_ENUM( n, ILIST_PARAMS_COPY,unused){} \
90 tuple( tuple&& t )BOOST_PP_IF(n,:,BOOST_PP_EMPTY())BOOST_PP_ENUM( n, ILIST_PARAMS_COPY,unused){} \
91 tuple(){}\
92 template<typename V>\
93 void visit( V&& v ) { BOOST_PP_REPEAT(n,VISIT_PARAMS,a) }\
94 template<typename V>\
95 void visit( V&& v )const { BOOST_PP_REPEAT(n,VISIT_PARAMS,a) }\
96 BOOST_PP_REPEAT(n,MEM_PARAMS,a) \
97 }; \
98 template<BOOST_PP_ENUM_PARAMS( n, typename AA)> \
99 tuple<BOOST_PP_ENUM_PARAMS(n,AA)> make_tuple( BOOST_PP_ENUM( n, RREF_PARAMS, unused) ) { \
100 return tuple<BOOST_PP_ENUM_PARAMS(n,AA)>( BOOST_PP_ENUM( n, FORWARD_PARAMS,unused ) ); \
101 } \
102 template<typename Functor, BOOST_PP_ENUM_PARAMS(n,typename AA)> \
103 auto call_fused( Functor f, tuple<BOOST_PP_ENUM_PARAMS(n,AA)>& t ) \
104 -> decltype( f( BOOST_PP_ENUM( n, LIST_MEMBERS_ON, t) ) ) { \
105 return f( BOOST_PP_ENUM( n, LIST_MEMBERS_ON, t) ); \
106 } \
107 template<typename Functor, BOOST_PP_ENUM_PARAMS(n,typename AA)> \
108 auto call_fused( Functor f, const tuple<BOOST_PP_ENUM_PARAMS(n,AA)>& t ) \
109 -> decltype( f( BOOST_PP_ENUM( n, LIST_MEMBERS_ON, t) ) ) { \
110 return f( BOOST_PP_ENUM( n, LIST_MEMBERS_ON, t) ); \
111 } \
112 template<BOOST_PP_ENUM_PARAMS( n, typename AA)> \
113 struct is_tuple<fc::tuple<BOOST_PP_ENUM_PARAMS(n,AA)> > { \
114 typedef fc::true_type type; \
115 }; \
116 template<BOOST_PP_ENUM_PARAMS( n, typename AA)> \
117 struct deduce<fc::tuple<BOOST_PP_ENUM_PARAMS(n,AA)> > { \
118 typedef fc::tuple<BOOST_PP_ENUM( n, DEDUCE_MEMBERS,unused)> type; \
119 };