TreeExplorer: fix spurious copy of iterator (argument) on functor invocation

...since our iterators *always* yield a reference to the exposed element,
we can *always* get that referency into the nested yield to obtain the value
This commit is contained in:
Fischlurch 2017-11-26 22:29:51 +01:00
parent 9e96ea8323
commit 89005dbeb7

View file

@ -354,7 +354,7 @@ namespace lib {
template<class IT>
struct ArgAccessor<IT, enable_if<std::is_convertible<typename IT::value_type, Arg>>>
{
static auto build() { return [](auto iter) { return *iter; }; }
static auto build() { return [](auto& iter) { return *iter; }; }
};