Boost logo

Boost :

From: Alexander Nasonov (alnsn-mycop_at_[hidden])
Date: 2004-04-10 03:03:58

Tom Brinkman wrote:

> The review of Assignment Library library, written by
> Thorsten Ottosen 2003 (nesotto_at_[hidden]) starts
> today(April 1, 2004)and runs for 10 days.
> Latest version of the library is available at:
> (204 kB) or in the sandbox.

My review doesn't pretend to be complete. I took a quick look at
documentation and at a couple of header files. I didn't analyze at all
neither BGL nor ublas related features.
I think the library cannot be accepted in its current state because library
version of operator+= is introduced to _every_ class having nested
value_type when one writes using boost::assignment (see my other reply for
One possible solution would be a special container_traits class:

// in insert_assigner.hpp
// right before operator+=
    template<class Container>
    struct container_traits
        typedef void value_type; // SFINAE fails by default

    template<class T, class Alloc>
    struct container_traits< ::std::vector<T,Alloc> >
        typedef T value_type;

    // specializations for other STL containers
    // ...

    template< typename C >
    inline insert_assigner<C>
    operator+=( C& c, const typename container_traits<C>::value_type& v )
        return insert_assigner<C>( c, v );

Alexander Nasonov
Independent Developer and Consultant

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