Bug fix.
authordeba
Thu, 01 Sep 2005 12:14:14 +0000
changeset 167285e30ec7c957
parent 1671 3c82a0d9e0e7
child 1673 8919ca9e70f3
Bug fix.

Default assign operator should be
overrided by that calls the template
assign operator.
lemon/bits/default_map.h
     1.1 --- a/lemon/bits/default_map.h	Wed Aug 31 23:14:58 2005 +0000
     1.2 +++ b/lemon/bits/default_map.h	Thu Sep 01 12:14:14 2005 +0000
     1.3 @@ -171,6 +171,11 @@
     1.4        NodeMap(const Graph& _g, const _Value& _v) 
     1.5  	: Parent(_g, _v) {}
     1.6  
     1.7 +      NodeMap& operator=(const NodeMap& cmap) {
     1.8 +	return operator=<NodeMap>(cmap);
     1.9 +      }
    1.10 +
    1.11 +
    1.12        /// \brief Template assign operator.
    1.13        ///
    1.14        /// The given parameter should be conform to the ReadMap
    1.15 @@ -202,6 +207,10 @@
    1.16        EdgeMap(const Graph& _g, const _Value& _v) 
    1.17  	: Parent(_g, _v) {}
    1.18  
    1.19 +      EdgeMap& operator=(const EdgeMap& cmap) {
    1.20 +	return operator=<EdgeMap>(cmap);
    1.21 +      }
    1.22 +
    1.23        template <typename CMap>
    1.24        EdgeMap& operator=(const CMap& cmap) {
    1.25  	checkConcept<concept::ReadMap<Edge, _Value>, CMap>();
    1.26 @@ -240,6 +249,10 @@
    1.27        UndirEdgeMap(const Graph& _g, const _Value& _v) 
    1.28  	: Parent(_g, _v) {}
    1.29  
    1.30 +      UndirEdgeMap& operator=(const UndirEdgeMap& cmap) {
    1.31 +	return operator=<UndirEdgeMap>(cmap);
    1.32 +      }
    1.33 +
    1.34        template <typename CMap>
    1.35        UndirEdgeMap& operator=(const CMap& cmap) {
    1.36  	checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();