Boost logo

Boost :

From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-05-30 10:46:25


I found a snippet from <boost/assign/ptr_list_of.hpp>:

    template< class T >
    class generic_ptr_list
        // ...
        template< class PtrContainer >
        operator std::auto_ptr<PtrContainer>() const
        { .. }

IIRC, this automatic conversion doesn't work on any conforming compiler.
The right way seems to make lvalue:
'operator std::auto_ptr<PtrContainer> & () const'.


Shunsuke Sogame

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