Bug fixes in the ReferenceMap concept.
authorPeter Kovacs <kpeter@inf.elte.hu>
Tue, 12 Feb 2008 12:37:22 +0100
changeset 749394072da54f
parent 73 c56b7389dc78
child 75 6265aa2f9d7e
Bug fixes in the ReferenceMap concept.
lemon/concepts/maps.h
     1.1 --- a/lemon/concepts/maps.h	Tue Feb 05 11:24:57 2008 +0100
     1.2 +++ b/lemon/concepts/maps.h	Tue Feb 12 12:37:22 2008 +0100
     1.3 @@ -55,7 +55,6 @@
     1.4  
     1.5        template<typename _ReadMap>
     1.6        struct Constraints {
     1.7 -
     1.8  	void constraints() {
     1.9  	  Value val = m[key];
    1.10  	  val = m[key];
    1.11 @@ -175,10 +174,9 @@
    1.12        void set(const Key &k,const Value &t) { operator[](k)=t; }
    1.13  
    1.14        template<typename _ReferenceMap>
    1.15 -      struct ReferenceMapConcept {
    1.16 -
    1.17 +      struct Constraints {
    1.18  	void constraints() {
    1.19 -	  checkConcept<ReadWriteMap, _ReferenceMap >();
    1.20 +	  checkConcept<ReadWriteMap<K, T>, _ReferenceMap >();
    1.21  	  m[key] = val;
    1.22  	  val  = m[key];
    1.23  	  m[key] = ref;
    1.24 @@ -191,10 +189,10 @@
    1.25  
    1.26  	typename _ReferenceMap::Key& own_key;
    1.27  	typename _ReferenceMap::Value& own_val;
    1.28 -	typename _ReferenceMap::Reference& own_ref;
    1.29 +	typename _ReferenceMap::Reference own_ref;
    1.30  	Key& key;
    1.31  	Value& val;
    1.32 -	Reference& ref;
    1.33 +	Reference ref;
    1.34  	_ReferenceMap& m;
    1.35        };
    1.36      };