Boost logo

Boost Users :

Subject: Re: [Boost-users] [bind] counterintuitive behavior with vector andauto_ptr
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-06-12 09:33:53


Christian Henning wrote:
> All auto_ptrs have been copied a couple of lines before. See the
> std::copy call. After that my debugger tells me that all auto_ptrs are
> empty which makes sense. Still not clear to me what exactly happens
> when using bind.

bind does the equivalent of p.get()->foo(). This doesn't call
auto_ptr::operator->, whereas your two other examples do. So maybe VC10 has
a get() != 0 assertion inside its op->.


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