Aleksey Gurtovoy <[EMAIL PROTECTED]> writes: > David A. Greene wrote: >> Well, that's not creating a boost::tuple. :) I could certainly use >> mpl::fold or some similar algorithm to create boost::tuple<int, >> boost::tuple<...> > > > but I'm not sure that "really" a boost::tuple >> either. cons<int, cons<...> > > > might be closer. > > Yep, the later will give you all the functionality of > 'boost::tuple<int,...>' except the constructors and assignment from > 'std::pair'. A generator for it is as simple as this: > > template< typename Types > struct tuple_gen > : fold_backward< > Types > , boost::tuples::null_type > , boost::tuples::cons<_2,_1>
Wow, is cons a metafunction? It doesn't appear to be. I know we discussed making non-metafunctions usable as MPL lambda-expressions, but I didn't think you would opt for the transparent approach, with automatic detection of nested ::type. I thought you were going to require some explicit wrapper template... Not that I mind this approach. > -- David Abrahams [EMAIL PROTECTED] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost