Boost logo

Boost Users :

From: Mark Storer (MStorer_at_[hidden])
Date: 2004-05-07 11:15:36


> > Now it doesn't compile because (of course) Attr::Write is
> not a method of
> > shared_ptr<Attr>.
> >
> > Do I have to use boost's bind and mem_fn objects instead of std?
>
> Yes; bind and mem_fn handle this problem (and quite a few
> others) automatically.

Why is this a problem? I thought std::mem_fn called the function through the -> operator, which 'should' work (but obviously doesn't). I would think this would only crop up through mem_fun_ref, but then you wouldn't have a container of shared_ptr<Attr>, but Attr.

--Baffled

--Mark Storer
  Senior Software Engineer
  Verity, Inc.


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