Boost logo

Boost :

From: Markus Pesti (news1_at_[hidden])
Date: 2003-01-16 09:07:41


"David Abrahams" <dave_at_[hidden]> schrieb im Newsbeitrag
news:u65sp1b7s.fsf_at_boost-consulting.com...
> Or you can use the indirect iterator adaptor from the boost sandbox
(boost/iterator/iterator_adaptors.hpp)
>
> bool find(const std::list<boost::shared_ptr<A> >& Alist, int v) {
> return std::::find_if(
> , make_indirect_iterator(Alist.begin())
> , make_indirect_iterator(Alist.end())
> A(v)) != Alist.end();
> }

Thank you very much. But I cannot compile it:

/usr/include/c++/3.2/bits/stl_iterator_base_types.h:123: no type named
`iterator_category' in `class boost::shared_ptr<A>'
/usr/include/c++/3.2/bits/stl_iterator_base_types.h:125: no type named
`difference_type' in `class boost::shared_ptr<A>'
/usr/include/c++/3.2/bits/stl_iterator_base_types.h:126: no type named
`pointer' in `class boost::shared_ptr<A>'
/usr/include/c++/3.2/bits/stl_iterator_base_types.h:127: no type named
`reference' in `class boost::shared_ptr<A>'

Do you know, what's wrong here?

Markus


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