A program I'm expanding uses std::pair<>
a lot.
There is a point in my code at which the compiler throws a rather large:
Non-static const member, 'const Ptr std::pair, const double*>::first' can't use default assignment operator
I'm not really sure what this is referring to? Which methods are missing from the Ptr class?
The original call that causes this problem is as follows:
vector_of_connections.pushback(pair(Ptr<double,double>,WeightValue*));
Where it's putting an std::Pair<Ptr<double,double>, WeightValue*>
onto a vector, where WeightValue*
is a const variable from about 3 functions back, and the Ptr<double,double>
is taken from an iterator that works over another vector.
For future reference, Ptr<double,double>
is a pointer to a Node
object.