Re: [Q] template compile error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux