>From: "Aleksey Gurtovoy" <[EMAIL PROTECTED]> > How would you call an 'apply' counterpart that takes a metafunction class > and a _sequence_ of arguments, i.e.: > > typedef list_c<int,5,0> args; > typedef apply_tuple< plus<>, args >::type sum; // this one > BOOST_STATIC_ASSERT(sum::value == 5); > > ? > > If it was run-time C++, I would be happy with 'apply_tuple', but in MPL > domain "tuple" isn't really the right word, and I don't like 'apply_seq' or, > worse yet, 'apply_sequence'. Or should it be 'seq_apply' (from an English > language standpoint)? > > Anyway, suggestions and opinions are welcome!
I guess this is another good argument for class template overloading. Does anyone know if this has been "formally" proposed for C0x? A quick search at Google Groups turned up nothing. With it, you might have used: template<> struct plus<default_type, default_type> { template<class T1, class T2, class T3, class T4, class T5> struct apply { ... } template<class Sequence> struct apply { ... } }; And what about partial specialisation of function templates? Could there be a good chance to get that, as well? I guess these things depend much on somebody writing a formal proposal. :) Regards, Terje _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost