--- Begin Message ---
Subject: |
Re: Template problem |
Date: |
Tue, 03 Jul 2007 17:58:50 +0200 |
User-agent: |
KNode/0.10.5 |
address@hidden wrote:
> Hello,
>
>> address@hidden wrote:
>> > __gnu_cxx::hash_set< PointerTemplate*, pointerHashFunction,
>> > pointerEquality, std::allocator< PointerTemplate* > >::iterator
>> > hash_setIterator;
>>
>> You need typename in front of this, it is a dependent type.
>
> It works now! Thank you very much!
>
> But could you explain to me the difference between the declaration of
> the hash set and the declaration of its iterator?
The iterator is a member of the hash_set.
> It seems to me, that both are dependent times or none of them, since the
> declaration is so similar!
No. The compiler knows that hash_set is a class template, and thus
hash_set<...> must be a type. But it cannot possibly know which members it
contains, because that depends on the template parameters, and the exact
template parameters is not known.
--
rbh
--- End Message ---
--- Begin Message ---
Subject: |
confirm 67cb3fae4454667a92920a43181e3a96d45e2e59 |
If you reply to this message, keeping the Subject: header intact,
Mailman will discard the held message. Do this if the message is
spam. If you reply to this message and include an Approved: header
with the list password in it, the message will be approved for posting
to the list. The Approved: header can also appear in the first line
of the body of the reply.
--- End Message ---