value_type problem
Martin v. Loewis
martin@mira.isdn.cs.tu-berlin.de
Sun Aug 1 01:33:00 GMT 1999
> I found compiling errors when I used g++ 2.95 to compile stack.cc
> which is attached.
Thanks for your bug report. These are errors in your code.
> const value_type& front() const { return top(); }
value_type is not defined here. You might expect that it is inherited
from the base type, but it is not found there until instantiation
time (since the base class is a template class). So you have to write
const super::value_type& front() const { return top(); }
Regards,
Martin
More information about the Gcc-bugs
mailing list