
2 Sep
2008
2 Sep
'08
11:31 a.m.
Peter Barker:
In my program auto_ptr is being used in boost::bind via boost::ref and it works fine. Does this work by design, or coincidence? I couldn't see boost::reference_wrapper and boost::addressof handling std::auto_ptr specially.
It works by design. boost::mem_fn uses get_pointer, and get_pointer for auto_ptr returns .get(). For lambda::bind, you may want to try using *ll::var(p) instead; lambda::bind has no special support for smart pointers.