Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-07-01 05:51:14


From: "Bill Eidson" <yg-boost-users_at_[hidden]>
> std::vector< boost::shared_ptr<T> > TVec;
>
> I want to write a function object to run std::for_each. to do somework
> against members of
> T and accumulate results in functor. My attempts have failed in VC7 with
> memory errors in my operator() method.
>
> struct fo
> {
> bool operator()( boost::shared_ptr<T>& t )
> {
> return true;
> }
> };

Can you post a complete program that shows the problem? I see nothing wrong
with the snippets above. Perhaps you try to call a member via an empty
shared_ptr?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net