From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2007-10-23 12:42:44


Ion Gaztañaga schrieb:

> You are right. I'm returning the address of a temporary! I think
> conceptually the iterator is wrong. I should return char & for
> operator*() instead of char *. char *should be returned by
> operator->.

[...]

> If I want basic_multiallocation_iterator to be a well-formed iterator
> I need to define operator->() so I think I'll need to change the
> interface of this class (I doubt anyone is using it).

If it is unused, remove it I'd say.

> Give me some time to change it and pass the tests again.

In the mean time, could you perhaps change the code in question to
&(*this)? This would at least make the compilation error go away. And
perhaps insert an assert(false), to mark the code as invalid.

Markus