COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
04/14/15 16:36:45 (9 years ago)
Author:
Balazs Dezso <deba@…>
Branch:
default
Phase:
public
Message:

Fix problem with temporal iterator parameters (#325)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/stl_iterators.h

    r1336 r1339  
    5656  template<class LIT, class P>
    5757  class LemonRangeWrapper1 {
    58     const P &_p;
    5958    typedef LemonItWrapper<LIT> It;
     59    It _begin;
     60   
    6061  public:
    61     LemonRangeWrapper1(const P &p) : _p(p) {}
     62    LemonRangeWrapper1(const P &p) : _begin(LIT(p)) {}
    6263    It begin() const {
    63       return It(LIT(_p));
     64      return _begin;
    6465    }
    6566    It end() const {
     
    8182  template<class LIT, class P1, class P2>
    8283  class LemonRangeWrapper2 {
    83     const P1 &_p1;
    84     const P2 &_p2;
    85     typedef LemonItWrapper<LIT> It;
    86   public:
    87     LemonRangeWrapper2(const P1 &p1, const P2 &p2) : _p1(p1), _p2(p2) {}
     84    typedef LemonItWrapper<LIT> It;
     85    It _begin;
     86 public:
     87    LemonRangeWrapper2(const P1 &p1, const P2 &p2) : _begin(LIT(p1, p2)) {}
    8888    It begin() const {
    89       return It(LIT(_p1, _p2));
     89      return _begin;
    9090    }
    9191    It end() const {
Note: See TracChangeset for help on using the changeset viewer.