Fix to use IterAdapter with generic "position" types

seemingly the operator-> was not yet used in any real scenario.
The whole point with IterAdapter is that it uses an opaque "location type",
which is owned by the controlling container. In many cases this will
actually be just a pointer into the container storage, but we
must not assume it is this way. Thus the only way to obtain a
(language) pointer is to dereference the "position type" and
take the address of the result
This commit is contained in:
Fischlurch 2015-09-11 18:32:08 +02:00
parent 0d10e62851
commit 82ef5964ba

View file

@ -193,7 +193,7 @@ namespace lib {
operator->() const
{
_maybe_throw();
return pos_;
return & *pos_;
}
IterAdapter&