Thanks for catching this one. You will need to add "typename" in front of each line where the error occurs.
PocketMatrix won't allow me to attach a .h file, so here is the interesting part:
- Code:
template<class _Bfn>
class binder1st
: public unary_function<typename _Bfn::second_argument_type, typename _Bfn::result_type>
{
public:
binder1st(const _Bfn& _X, const typename _Bfn::first_argument_type& _Y)
: op(_X), value(_Y) {}
result_type operator()(const argument_type& _X) const
{return (op(value, _X)); }
protected:
_Bfn op;
typename _Bfn::first_argument_type value;
};
template<class _Bfn>
class binder2nd
: public unary_function<typename _Bfn::first_argument_type,
typename _Bfn::result_type> {
public:
binder2nd(const _Bfn& _X,
const typename _Bfn::second_argument_type& _Y)
: op(_X), value(_Y) {}
result_type operator()(const argument_type& _X) const
{return (op(_X, value)); }
protected:
_Bfn op;
typename _Bfn::second_argument_type value;
};