COIN-OR::LEMON - Graph Library

Changeset 54:ff9bac2351bf in lemon-1.2


Ignore:
Timestamp:
01/09/08 00:40:21 (17 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Minor bug fix in maps.h.
Fixed the existing two variants of stdMap() and added two new variants.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/maps.h

    r51 r54  
    251251  ///default value.
    252252  ///\relates StdMap
    253   template<typename K, typename V, typename Compare = std::less<K> >
     253  template<typename K, typename V, typename Compare>
    254254  inline StdMap<K, V, Compare> stdMap(const V& value = V()) {
    255255    return StdMap<K, V, Compare>(value);
    256256  }
    257 
     257 
     258  ///Returns a \c StdMap class
     259
     260  ///This function just returns a \c StdMap class with specified
     261  ///default value.
     262  ///\relates StdMap
     263  template<typename K, typename V>
     264  inline StdMap<K, V, std::less<K> > stdMap(const V& value = V()) {
     265    return StdMap<K, V, std::less<K> >(value);
     266  }
     267 
    258268  ///Returns a \c StdMap class created from an appropriate std::map
    259269
     
    261271  ///appropriate std::map.
    262272  ///\relates StdMap
    263   template<typename K, typename V, typename Compare = std::less<K> >
     273  template<typename K, typename V, typename Compare>
    264274  inline StdMap<K, V, Compare> stdMap( const std::map<K, V, Compare> &map,
    265275                                       const V& value = V() ) {
    266276    return StdMap<K, V, Compare>(map, value);
     277  }
     278
     279  ///Returns a \c StdMap class created from an appropriate std::map
     280
     281  ///This function just returns a \c StdMap class created from an
     282  ///appropriate std::map.
     283  ///\relates StdMap
     284  template<typename K, typename V>
     285  inline StdMap<K, V, std::less<K> > stdMap( const std::map<K, V, std::less<K> > &map,
     286                                             const V& value = V() ) {
     287    return StdMap<K, V, std::less<K> >(map, value);
    267288  }
    268289
Note: See TracChangeset for help on using the changeset viewer.