fork download
  1. #include <functional>
  2.  
  3. using namespace std;
  4.  
  5. template <typename ARGUEMENT, typename RESULT>
  6. class FunctorBase : public std::unary_function<ARGUEMENT, RESULT>
  7. {
  8. public:
  9. virtual result_type operator () (argument_type) = 0;
  10. FunctorBase() {}
  11. virtual ~FunctorBase() {}
  12. };
  13.  
  14. int main()
  15. {
  16. FunctorBase<int&, void>();
  17. }
  18.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:9:13: error: ‘result_type’ does not name a type
prog.cpp:9:13: note: (perhaps ‘typename std::unary_function<_Arg, _Result>::result_type’ was intended)
stdout
Standard output is empty