Boost logo

Boost :

From: Shunsuke Sogame (mb2act_at_[hidden])
Date: 2006-10-13 21:02:30


If a pointer container holds noncopyable objects,
the iterators seem not to meet ReadableIteratorConcept
whose 'value_type' must be CopyConstructible?
This doesn't compile:

    #include <boost/ptr_container/ptr_vector.hpp>
    #include <boost/concept_check.hpp>
    #include <boost/iterator/iterator_concepts.hpp>
    #include <boost/noncopyable.hpp>

    struct my :
    { };

    template< class Iterator >
    void foo(Iterator)
boost_concepts::ReadableIteratorConcept<Iterator> >();

    int main()
        boost::ptr_vector<my> vec;

Anything wrong..?

Shunsuke Sogame

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