Updated
This is the method that gives me trouble:
void A::normalizeUrls()
{
for (set<CUrl>::iterator it = _references.begin(); it != _references.end(); ++it)
{
if (it->isValid())
{
it->normalize().makeFull(_baseUrl);
}
}
}
And here are CUrl::normalize and CUrl::makeFull
CUrl& makeFull (CUrl&)
{
return *this;
}
CUrl& CUrl::normalize()
{
return *this;
}
The errors are: CUrl::normalize' : cannot convert 'this' pointer from 'const CUrl' to 'CUrl &'
left of '.makeFull' must have class/struct/union
Why is that so, what am I missing?
Thanks in advance!
In practice, the members of a set are
const(immutable), so you cannot call non-const member functions on them.If that was allowed, you might change their values and invalidate the ordering of the set.