Boost logo

Boost :

Subject: Re: [boost] [tokenmap] updated perfect hash container in sandbox
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2010-04-24 11:52:43

Slawomir Lisznianski skrev:
> Thorsten Ottosen wrote:
>Consider also to reorder your template arguments to make the interface
>> as close to normal maps as possible.
> The intention was that the token-type, being limited to an integral
> type, would default to an int which would work for vast majority of
> cases. So the user could simply write:
> tokenmap<my_class> fast_map;
> instead of:
> tokenmap<int, my_class> fast_map;
> The second may give an impression that the key can be anything other,
> whereas in reality it's quite limiting.
> I don't feel strong about either method though.

Is suggest that you use BOOST_STATIC_ASSERT and a type_trait to make the
requirement checked and explicit. And to make the syntax mimic that of
normal maps.


Boost list run by bdawes at, gregod at, cpdaniel at, john at