Re: err ITERATOR LIST CORRUPTED!
- From: "DR" <dr1234@xxxxxxxxx>
- Date: Tue, 1 May 2007 02:35:47 +0200
The sample code doen't show the problem, but the real code is too complex to
post.
If I make the variable "cursor" a iterator instead of const_iterator, it
works.
iterator cursor = the_list.begin(); // works
const_iterator cursor2 = the_list.begin(); // raises error
I have no idea why.
In the debug build I get this assertion ITERATOR LIST CORRUPTED (release
works).
I think it`s because I call list.begin() on an empty iterator list.
Sample Code:
class x
{
x() : the_list(), cursor(the_list.begin())
{
}
std::list<void *> the_list;
mutable std::list<void *>::const_iterator cursor;
}
----
THANKS
.
- Follow-Ups:
- Re: err ITERATOR LIST CORRUPTED!
- From: Tom Widmer [VC++ MVP]
- Re: err ITERATOR LIST CORRUPTED!
- From: DR
- Re: err ITERATOR LIST CORRUPTED!
- Prev by Date: Re: corrupted pointer when initing a dll
- Next by Date: Re: MAKEINTRESOURCE
- Previous by thread: Re: corrupted pointer when initing a dll
- Next by thread: Re: err ITERATOR LIST CORRUPTED!
- Index(es):
Relevant Pages
|
Loading