In article <3D88FAF9.4010705@137.org> you write:
SGI's MIPSpro Compilers 7.3.1.3m compiles the code fine, and so does MS
Visual C++ 7 (!). Most of the time, GCC 3.x blows both of these out of
the water, and thus my surprise when I got the above error. I couldn't
find a PR relating to this, so I am wondering if this is this a known
problem.
Just because another compiler compiles your code, that doesn't make
them better (just less up-to-date with the standard, in this case ;-)
Try this implementation of B<T>::toString():
std::string toString() const
{
return mObj.template getValue<std::string>();
}