|
Boost : |
From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2007-08-10 09:30:22
Tobias Schwinger ha escrito:
[...]
> So it comes down to whether we prefer to write e.g.
>
> (variant 1)
>
> container< type::value_traits<type>, a_default, another_default,
> false >
>
> or (variant 2)
>
> struct my_settings : defaults
> {
> static bool const constant_time_size_operation = false;
> };
>
> container< type, my_settings >
>
> or (variant 3)
>
> container< type, constant_time_size_operation<false> >
>
> Is it easier to write customize a container with variant 1, 2 or 3?
[...]
Tobias and Ion,
I'm writing a lib for eventual submission to Boost that incidentally uses
Boost.Parameter to achieve a flexible template argument specification like
the one you're discussing. The thing is, you can have (2) and (3) at a time,
so that both
container<type,my_settings>
and
container< type,constant_time_size_operation<false> >
can be served. If you'd like to have a look, please tell me so via private
email and I'll send you the stuff.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk