# HG changeset patch # User Balazs Dezso # Date 1429022205 -7200 # Node ID 93d455c647bea5c970a0afad03e621037f4f0a89 # Parent 0998f70d0b2d0e22855c1d44e88b767197a00d8d Fix problem with temporal iterator parameters (#325) diff -r 0998f70d0b2d -r 93d455c647be lemon/bits/stl_iterators.h --- a/lemon/bits/stl_iterators.h Tue Apr 14 16:14:32 2015 +0200 +++ b/lemon/bits/stl_iterators.h Tue Apr 14 16:36:45 2015 +0200 @@ -55,12 +55,13 @@ /// \c P is the type of the parameter of the constructor of \c LIT. template class LemonRangeWrapper1 { - const P &_p; typedef LemonItWrapper It; + It _begin; + public: - LemonRangeWrapper1(const P &p) : _p(p) {} + LemonRangeWrapper1(const P &p) : _begin(LIT(p)) {} It begin() const { - return It(LIT(_p)); + return _begin; } It end() const { return It(lemon::INVALID); @@ -80,13 +81,12 @@ /// of the constructor of \c LIT. template class LemonRangeWrapper2 { - const P1 &_p1; - const P2 &_p2; - typedef LemonItWrapper It; - public: - LemonRangeWrapper2(const P1 &p1, const P2 &p2) : _p1(p1), _p2(p2) {} + typedef LemonItWrapper It; + It _begin; + public: + LemonRangeWrapper2(const P1 &p1, const P2 &p2) : _begin(LIT(p1, p2)) {} It begin() const { - return It(LIT(_p1, _p2)); + return _begin; } It end() const { return It(lemon::INVALID);