Boost logo

Boost Users :

From: Meryl Silverburgh (silverburgh.meryl_at_[hidden])
Date: 2008-07-15 20:12:11


Hi,

I have a pointer to a class:
A* aPt;
and I deference it to pass that as a reference
void aFunction(A& aRef);

and I call
aFunction(*aPt);

but if I switch to use boost smart pointer how can I de-reference it
and call aFunction()?

shared_ptr<A> aPt;

I tried:
aFunction(aPt); // does not compile
aFunction(aPt->get()); // does not compile.

Thank you for any help.


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