COIN-OR::LEMON - Graph Library

Changeset 123:8899d1891a3c in lemon-1.2 for lemon


Ignore:
Timestamp:
04/08/08 22:51:26 (16 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Small improvements in maps.h

  • Add a new version of constMap() function.
  • Fix in FunctorToMap? class.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/maps.h

    r104 r123  
    117117
    118118    /// Constructor with specified initial value.
    119     /// \param v is the initial value of the map.
     119    /// \param v The initial value of the map.
    120120    ConstMap(const Value &v) : _value(v) {}
    121121
     
    142142  inline ConstMap<K, V> constMap(const V &v) {
    143143    return ConstMap<K, V>(v);
     144  }
     145
     146  template<typename K, typename V>
     147  inline ConstMap<K, V> constMap() {
     148    return ConstMap<K, V>();
    144149  }
    145150
     
    614619           typename V = typename F::result_type>
    615620  class FunctorToMap : public MapBase<K, V> {
    616     const F &_f;
     621    F _f;
    617622  public:
    618623    typedef MapBase<K, V> Parent;
Note: See TracChangeset for help on using the changeset viewer.