
17 Feb
2010
17 Feb
'10
10:25 p.m.
Sorry... looks like I was getting more complicated than necessary with talks of unions, mpl, etc. and suddenly realized what the "," actually does. To answer my own question: template<typename ArgPack1, typename ArgPack2> double g(const ArgPack1& args1, const ArgPack2& args2) { return f( (args1, args2) ); //comma does the union! } //or you can get at the underlying type with decltype as usual. template<typename ArgPack1, typename ArgPack2> double g(const ArgPack1& args1, const ArgPack2& args2) { typedef typename decltype(args1, args2) union_type; union_type args = (args1, args2); return f(args); }