[Q] template compile error
jlh
jlh@gmx.ch
Fri Oct 21 19:06:00 GMT 2005
Moon Hwang wrote:
> I entered following template compile error when using gcc version 3.4.4.
> std::list<_T>::const_iterator it = original.begin();
Use this instead:
typename std::list<_T>::const_iterator it = original.begin();
I'm no expert, but because the parameter _T is not fix yet, GCC
has no way of knowing that std::list<_T>::const_iterator specifies
a type, so you have to tell it explicitely.
Cheers,
jlh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20051021/d5c36c46/attachment-0001.sig>
More information about the Gcc-help
mailing list