From 82ef5964ba79f1c9e1e4a2cb045ce8396fd64d49 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 11 Sep 2015 18:32:08 +0200 Subject: [PATCH] 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 --- src/lib/iter-adapter.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/iter-adapter.hpp b/src/lib/iter-adapter.hpp index ccf36f3d5..26d770694 100644 --- a/src/lib/iter-adapter.hpp +++ b/src/lib/iter-adapter.hpp @@ -193,7 +193,7 @@ namespace lib { operator->() const { _maybe_throw(); - return pos_; + return & *pos_; } IterAdapter&