PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Pfrog in vs2003?

Has anyone managed to get pfrog 0.8 to compile under visual studio 2003?

I get a string of errors relating to _Bfn in algo2d.h and my c++ is not good enough to figure it out.

I can't just use the libs, as anything compiled with them crashes on startup.

Thanks
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;
};


Sweet. That sorted it out.

Thanks.