Fedor Pikus wrote:
I was trying to come up with a solution for the following problem: say, I want to declare this class template
class A { public: A( T1 x, T2 y ) : xy( x + y ) {} private: The_Right_Type xy; }; Or I want to declare a function template: template
The_Right_Type f( T1 x, T2 y ) { return x + y; } The problem is, of course, what is The_Right_Type? I could not get a solution better than something which would require me to "register" all types in some way (then I could get types of all expressions involving registered types). Then Scott Meyers suggested I look at boost::result_of.
It doesn't work for this purpose. result_of