Boost Users :
Subject: Re: [Boost-users] [Multi-Index] crash on iterator copy or assignment
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-03-12 16:36:04
Dominique Devienne wrote:
> I've been using B.MI for a few days, and until now it's worked great
> for me. I've included below in Exhibit A a simplified (and a bit
> obfuscated, sorry) version of what I've been using (a proxy, indexed
> by name and type, and a method returning all instances of a given
> Filling in a list of all entries matching a given type (in exhibit A)
> works great.
> But now I was trying to return a custom (non-standard) iterator, where
> the client gets a pointer to a abstract base iterator (allows to hide
> the B.MI stuff in the concrete derived iterator), wrapped in an
> auto_ptr. The private concrete iterator internally stores the B.MI
> iterator from the index I'm interested in (exhibit B). This compiles
> (vs2005 sp1 on winXP 32), but it crashes at runtime on the call to
> boost::tie, during iterator assignment apparently. (call stack in
> exhibit C).
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?
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