I got the same compilation error with VS2010 and fixed it, inheriting from std::unary_function :
struct IsEven : std::unary_function<int, bool>
I only considered this because of the result appearing in the error message. I can only guess that std::ref , in VS2010, depends on typedef in unary_function :
template <class Arg, class Result> struct unary_function { typedef Arg argument_type; typedef Result result_type; };
EDIT:
See Cheers and hth's answer. - Alf regarding bug in VS2010.
hmjd Mar 06 '12 at 11:13 2012-03-06 11:13
source share