diff -r b6bede534255 -r 8899d1891a3c lemon/maps.h --- a/lemon/maps.h Thu Apr 03 13:00:18 2008 +0100 +++ b/lemon/maps.h Tue Apr 08 22:51:26 2008 +0200 @@ -116,7 +116,7 @@ /// Constructor with specified initial value /// Constructor with specified initial value. - /// \param v is the initial value of the map. + /// \param v The initial value of the map. ConstMap(const Value &v) : _value(v) {} /// Gives back the specified value. @@ -143,6 +143,11 @@ return ConstMap(v); } + template + inline ConstMap constMap() { + return ConstMap(); + } + template struct Const {}; @@ -613,7 +618,7 @@ typename K = typename F::argument_type, typename V = typename F::result_type> class FunctorToMap : public MapBase { - const F &_f; + F _f; public: typedef MapBase Parent; typedef typename Parent::Key Key;