[C++-sig] Re: indexing_v2 status update

Raoul Gough RaoulGough at yahoo.co.uk
Thu Jan 22 19:15:05 CET 2004


David Abrahams <dave at boost-consulting.com> writes:

> Joel de Guzman <joel at boost-consulting.com> writes:
>
>> Raoul Gough wrote:
>>
>>> David Abrahams <dave at boost-consulting.com> writes:
>>> 
>>>>Joel de Guzman <joel at boost-consulting.com> writes:
>>> [snip]
>>> 
>>>>>Looks cool to me ;-) My only concern is: what if the bits of an
>>>>>unsigned int runs out? Unlikely? What if the methods identifiers
>>>>>are types instead in a special namespace and specifying the
>>>>>methods is done using an mpl typelist? Example:
>>>>
>>>>One should at the very least use an unsigned long.  You're only
>>>>guaranteed 16 bits with unsigned int.
>>> I thought about this, but figured there weren't any 16-bit compilers
>>> that would compile the rest of the code anyway. Are there any real
>>> platforms where the compiler supports all that template machinery and
>>> has 16-bit ints (maybe some configurations of gcc)? I suppose it
>>> doesn't actually cost anything to go to unsigned long...
>>
>> Maybe I ought to write the static bitset thing. I wrote one before.
>> I'll see if I can get the prototype. There's one here:
>> http://spirit.sourceforge.net/dl_more/Spirit_StaticSet.h
>> I'll see if I can make it MPLish.
>
> It'd be easy to base it on vector_c<unsigned long, ....>

Something like this would be a good solution! Especially since it is
possible to take the complement of a set (handy for saying "all
features" or "all features except *this*"). However, it would need to
have compile-time determination of set membership. Is this possible?

-- 
Raoul Gough.
export LESS='-X'





More information about the Cplusplus-sig mailing list