[C++-sig] Re: indexing_v2 status update
Raoul Gough
RaoulGough at yahoo.co.uk
Fri Nov 28 17:09:23 CET 2003
David Abrahams <dave at boost-consulting.com> writes:
> Raoul Gough <RaoulGough at yahoo.co.uk> writes:
>
>> David Abrahams <dave at boost-consulting.com> writes:
[snip]
>>> The use of static constants in ContainerTraits is unattractive to
>>> me, because it's not particularly extensible. What about asking
>>> the user to provide an mpl::set of the property type tags:
>>>
>>> typedef mpl::set<mutable,find,insert,push_back> capabilities;
>>>
>>> or something?
>>
>> Looks like a good idea. I'll give this a go.
>
> We may need to whip mpl::set into shape. In the meantime you could
> use an mpl::vector, and mpl::find which will give slightly longer
> compiles but should work.
Actually, I'm not so sure about the benefits of making this change
now. For instance, the current boolean flag approach is the same one
used in std::numeric_limits.
What would you think about using bitwise-combinations of flags? I've
recently introduced this as a way to disable expensive features that
you don't need, and it seems pretty convenient. The only drawback I
can think of is a limitation (on many systems anyway) to 32 selectable
properties.
Is there anything else that using mpl::set or mpl::vector would get us
in terms of functionality that bitsets (or seperate bools) don't have?
--
Raoul Gough.
export LESS='-X'
More information about the Cplusplus-sig
mailing list