
Steven Watanabe wrote:
AMDG
Alexander,
This method seems to cover everything I can think of that is actually possible:
struct plus : function<plus, anyT (anyT const&, anyT const&)> { template<class R, class T0, class T1> R entry(const T0& t0, const T1& t1) { return(t0 + t1); } }
template<> struct overload<plus, int> { typedef typename transform< integral_types, binary_function<promotion_traits<int, _1>, int, _1> >::type type; }
//other integral types are similar
template<> struct overload<plus, string> { typedef vector< string(const string&, const string&), string(const string&, const char*), string(const char*, const string&) > type; };
I don't understand how you iterate over all specializations of overload template. -- Alexander Nasonov Project Manager at Akmosoft ( http://www.akmosoft.com ) Blog: http://nasonov.blogspot.com Email: $(FirstName) dot $(LastName) at gmail dot com