lemon/maps.h
changeset 1738 470aa67893f5
parent 1705 3f63d9db307b
child 1778 4ba7965386fb
equal deleted inserted replaced
14:7851c24d0a01 15:30ad47f9c249
    16 
    16 
    17 #ifndef LEMON_MAPS_H
    17 #ifndef LEMON_MAPS_H
    18 #define LEMON_MAPS_H
    18 #define LEMON_MAPS_H
    19 
    19 
    20 #include <lemon/utility.h>
    20 #include <lemon/utility.h>
    21 
    21 #include <lemon/traits.h>
    22 
    22 
    23 ///\file
    23 ///\file
    24 ///\ingroup maps
    24 ///\ingroup maps
    25 ///\brief Miscellaneous property maps
    25 ///\brief Miscellaneous property maps
    26 ///
    26 ///
   519     typedef typename Parent::Key Key;
   519     typedef typename Parent::Key Key;
   520     typedef typename Parent::Value Value;
   520     typedef typename Parent::Value Value;
   521 
   521 
   522     ///Constructor
   522     ///Constructor
   523     ComposeMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
   523     ComposeMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
   524     Value operator[](Key k) const {return m1[m2[k]];}
   524     
       
   525     typename MapTraits<M1>::ConstReturnValue
       
   526     operator[](Key k) const {return m1[m2[k]];}
   525   };
   527   };
   526   ///Returns a \ref ComposeMap class
   528   ///Returns a \ref ComposeMap class
   527 
   529 
   528   ///This function just returns a \ref ComposeMap class.
   530   ///This function just returns a \ref ComposeMap class.
   529   ///
   531   ///