COIN-OR::LEMON - Graph Library

Changeset 1725:22752dd6c693 in lemon-0.x


Ignore:
Timestamp:
10/14/05 13:00:40 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2252
Message:

Using proper return type

Location:
lemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/graph_adaptor.h

    r1697 r1725  
    15271527      }
    15281528     
    1529       typename ReferenceMapTraits<NodeImpl>::Reference
     1529      typename MapTraits<NodeImpl>::ReturnValue
    15301530      operator[](const Node& key) {
    15311531        if (key.entry) { return entry[key]; }
     
    15331533      }
    15341534
    1535       T operator[](const Node& key) const {
     1535      typename MapTraits<NodeImpl>::ConstReturnValue
     1536      operator[](const Node& key) const {
    15361537        if (key.entry) { return entry[key]; }
    15371538        else { return exit[key]; }
     
    15571558      }
    15581559     
    1559       typename ReferenceMapTraits<EdgeImpl>::Reference
     1560      typename MapTraits<EdgeImpl>::ReturnValue
    15601561      operator[](const Edge& key) {
    15611562        if ((typename Parent::Edge&)key != INVALID) { return orig[key]; }
     
    15631564      }
    15641565
    1565       T operator[](const Edge& key) const {
     1566      typename MapTraits<EdgeImpl>::ConstReturnValue
     1567      operator[](const Edge& key) const {
    15661568        if ((typename Parent::Edge&)key != INVALID) { return orig[key]; }
    15671569        else {return bind[key.bind]; }
  • lemon/maps.h

    r1705 r1725  
    1919
    2020#include <lemon/utility.h>
    21 
     21#include <lemon/traits.h>
    2222
    2323///\file
     
    522522    ///Constructor
    523523    ComposeMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
    524     Value operator[](Key k) const {return m1[m2[k]];}
     524   
     525    typename MapTraits<M1>::ConstReturnValue
     526    operator[](Key k) const {return m1[m2[k]];}
    525527  };
    526528  ///Returns a \ref ComposeMap class
Note: See TracChangeset for help on using the changeset viewer.