help-gplusplus
[Top][All Lists]
Advanced

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

Re: How to use a constructor of hashsets?


From: Bernd Strieder
Subject: Re: How to use a constructor of hashsets?
Date: Thu, 12 Jul 2007 10:56:30 +0200
User-agent: KNode/0.10.4

Hello,

 benjamin.bihler@gmx.de wrote:

> Hello,
> 
> I am trying to use the constructor of hashsets, that defines the
> minimum bucket size, but it does not compile.
> 
> // This line compiles:
> typename __gnu_cxx::hash_set< PointerTemplate, pointerHashFunction,
> pointerEqualityFunction >
> m_hsPointerSet;
> 
> // This line does not work:
> typename __gnu_cxx::hash_set< PointerTemplate, pointerHashFunction,
> pointerEqualityFunction >
> m_hsPointerSet( 10 );
> 
> I have tried several casts to size_t but g++ simply won't accept it.
> Could you tell me, what I am doing wrong?

The typename is not necessary in this case. It is truely irritating that
one case seems to work, but the other not.

If that does not help, please provide minimal code for reproducing the
problem. Copy the code to a fresh directory. Strip all uneccesary class
members, merge files. A screenful of code should suffice to demonstrate
the problem and resolve it.

Bernd Strieder



reply via email to

[Prev in Thread] Current Thread [Next in Thread]