¡@

Home 

c++ Programming Glossary: resultof

Extracting the return type from an overloaded function

http://stackoverflow.com/questions/7260561/extracting-the-return-type-from-an-overloaded-function

functions. #include iostream using namespace std #define resultof x typename ResultOf typeof x Type might need a before x template.. works since there is no ambiguity. does not work without resultof g x0 1 cout x0 endl does not work since type of f is unknown.. type of f is unknown due to ambiguity. same thing without resultof f x1 1 cout x1 endl does not work since typeof f is int not..