Boost logo

Boost :

From: Fredrik Blomqvist (fredrik_blomqvist_at_[hidden])
Date: 2003-09-30 15:53:38


Hi!

Looks good! I believe this is a highly needed complement to generic code.

A question though: Have you considered using separated-traits instead? (see
for example the new iterator_traits code by David Abrahams)

Like so:
container_value<C>::type;
container_reference<C>::type;
container_difference<C>::type;
etc ....

Philosofically I'd say this would be more in-line with the Open Closed
Principle. (and IIRC David Abrahams also raised the idea of refactoring
boost::call_traits into separate traits-classes a while ago.)

(looking forward to container_algo! :)
// Fredrik Blomqvist

PS. documentation nitpick; Could you make the semantic tables
auto-resizable? Right now they're unnecessarily hard to read in anything but
fullscreen mode..

Thorsten Ottosen wrote:
> Hi Boosters,
>
> The container_traits<> template have been a long way under way
> (originally termed array_traits).
> With the help of Pavol Dropa, I think we have a fairly solid
> implementation.
>
> I've uploaded container_traits.zip to the file section and you can
> also find docs, test, Jamfile etc in the sandbox.
>
> This library makes it possible to treat different types as if they
> have implemented a subset of the container requirements (See §23.1).
> The subset deals mostly with iterator returning functions and nested
> typedefs. It therefore becomes possible to treat built-in arrays,
> standard containers, pairs of iterators and some iterators uniformly.
> The main advantages are
>
> a.. safe use of built-in arrays
> b.. simpler implementation of generic container algorithms
> c.. more flexible client code
> Any feedback is welcome; especially test results for more compilers.
>
> best regards
>
> Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk