lemon/bits/map_extender.h
changeset 2289 03e4d2128efe
parent 2031 080d51024ac5
child 2384 805c5a2a36dd
equal deleted inserted replaced
8:ca59b5ebf0a5 9:8a85e9a5aa46
    22 #include <iterator>
    22 #include <iterator>
    23 
    23 
    24 #include <lemon/bits/traits.h>
    24 #include <lemon/bits/traits.h>
    25 
    25 
    26 #include <lemon/concept_check.h>
    26 #include <lemon/concept_check.h>
    27 #include <lemon/concept/maps.h>
    27 #include <lemon/concepts/maps.h>
    28 
    28 
    29 ///\file
    29 ///\file
    30 ///\brief Extenders for iterable maps.
    30 ///\brief Extenders for iterable maps.
    31 
    31 
    32 namespace lemon {
    32 namespace lemon {
   204       return operator=<MapExtender>(cmap);
   204       return operator=<MapExtender>(cmap);
   205     }
   205     }
   206 
   206 
   207     template <typename CMap>
   207     template <typename CMap>
   208     SubMapExtender& operator=(const CMap& cmap) {
   208     SubMapExtender& operator=(const CMap& cmap) {
   209       checkConcept<concept::ReadMap<Key, Value>, CMap>();
   209       checkConcept<concepts::ReadMap<Key, Value>, CMap>();
   210       Item it;
   210       Item it;
   211       for (graph.first(it); it != INVALID; graph.next(it)) {
   211       for (graph.first(it); it != INVALID; graph.next(it)) {
   212         Parent::set(it, cmap[it]);
   212         Parent::set(it, cmap[it]);
   213       }
   213       }
   214       return *this;
   214       return *this;