Boost logo

Boost Users :

Subject: Re: [Boost-users] [Multi-Index] crash on iterator copy or assignment
From: JOAQUIN M. LOPEZ MUÑOZ (joaquin_at_[hidden])
Date: 2009-03-12 16:55:49


Hi Dominique

________________________________________
De: boost-users-bounces_at_[hidden] [boost-users-bounces_at_[hidden]] En nombre de Dominique Devienne [ddevienne_at_[hidden]]
Enviado el: jueves, 12 de marzo de 2009 21:46
Para: boost-users_at_[hidden]
Asunto: Re: [Boost-users] [Multi-Index] crash on iterator copy or assignment

> On Thu, Mar 12, 2009 at 3:36 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> > After filling in enough to make your code compile,
> > it works for me. I've attached what I did. If this
> > works for you, can you post a minimal and complete
> > example that fails?
>
> Hi Steven,
>
> Your example works for me as well,
> since you've found the same fix my colleague found, which is to write
>
> std::auto_ptr<ByTypeFooIterator> iter_ptr(new ByTypeFooIterator);
>
> instead of
>
> std::auto_ptr<ByTypeFooIterator> iter_ptr = new ByTypeFooIterator;

I was trying to reproduce your problem locally but as usual
Steven outdid me :) FWIW, the last line should not compile, and
the fact that it does in VS2005 is a compiler bug:

http://tinyurl.com/abl9cj

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


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