COIN-OR::LEMON - Graph Library

Ticket #312: 312-703ebf476a1d.patch

File 312-703ebf476a1d.patch, 1.3 KB (added by Peter Kovacs, 10 years ago)
  • lemon/bits/map_extender.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1250793270 -7200
    # Node ID 703ebf476a1dd8a25ed96dc2c8daf19ba45817d3
    # Parent  9f529abcaebf13f19e61ba24fdd2c3631860af91
    Also check ReferenceMapTag in concept checks (#312)
    
    diff --git a/lemon/bits/map_extender.h b/lemon/bits/map_extender.h
    a b  
    4949    typedef typename Parent::Reference Reference;
    5050    typedef typename Parent::ConstReference ConstReference;
    5151
     52    typedef typename Parent::ReferenceMapTag ReferenceMapTag;
     53
    5254    class MapIt;
    5355    class ConstMapIt;
    5456
     
    191193    typedef typename Parent::Reference Reference;
    192194    typedef typename Parent::ConstReference ConstReference;
    193195
     196    typedef typename Parent::ReferenceMapTag ReferenceMapTag;
     197
    194198    class MapIt;
    195199    class ConstMapIt;
    196200
  • lemon/concepts/maps.h

    diff --git a/lemon/concepts/maps.h b/lemon/concepts/maps.h
    a b  
    182182
    183183      template<typename _ReferenceMap>
    184184      struct Constraints {
    185         void constraints() {
     185        typename enable_if<typename _ReferenceMap::ReferenceMapTag, void>::type
     186        constraints() {
    186187          checkConcept<ReadWriteMap<K, T>, _ReferenceMap >();
    187188          ref = m[key];
    188189          m[key] = val;