lemon/concepts/maps.h
branch1.1
changeset 1064 40bbb450143e
parent 912 37f440367057
child 1081 f1398882a928
equal deleted inserted replaced
17:9ebf0842cd00 18:4fd4729c548e
   180       /// Sets the value associated with the given key.
   180       /// Sets the value associated with the given key.
   181       void set(const Key &k,const Value &t) { operator[](k)=t; }
   181       void set(const Key &k,const Value &t) { operator[](k)=t; }
   182 
   182 
   183       template<typename _ReferenceMap>
   183       template<typename _ReferenceMap>
   184       struct Constraints {
   184       struct Constraints {
   185         void constraints() {
   185         typename enable_if<typename _ReferenceMap::ReferenceMapTag, void>::type
       
   186         constraints() {
   186           checkConcept<ReadWriteMap<K, T>, _ReferenceMap >();
   187           checkConcept<ReadWriteMap<K, T>, _ReferenceMap >();
   187           ref = m[key];
   188           ref = m[key];
   188           m[key] = val;
   189           m[key] = val;
   189           m[key] = ref;
   190           m[key] = ref;
   190           m[key] = cref;
   191           m[key] = cref;