Доброго времени суток.
Есть такое вот определение:
template <class Arg, class Result>
struct unary_function
{
typedef Arg argument_type;
typedef Result result_type;
};
далее идет:
template <class Predicate>
class unary_negate : public unary_function<Predicate::argument_type, bool>
{
protected:
Predicate pred;
public:
unary_negate(const Predicate& x) : pred(x) {}
bool operator()(const argument_type& x) const { return !pred(x); }
};
вот что выдает компилятор на вот эту
class unary_negate : public unary_function<Predicate::argument_type, bool>
строчку:
1>d:\1\core\stl\function.h(147) : warning C4346: Predicate::first_argument_type: зависимое имя не является типом
1> укажите префикс 'typename' для задания типа
1> d:\st-cash\core\stl\function.h(156): см. ссылку на создание экземпляров класса шаблон при компиляции "binary_negate<Predicate>"
1>d:\1\core\stl\function.h(147) : error C2923: binary_function: "Predicate::first_argument_type" не является допустимым аргументом типа шаблон для параметра "Arg1"
Не могу понять что за ошибка.