diff --git a/lemon/maps.h b/lemon/maps.h --- a/lemon/maps.h +++ b/lemon/maps.h @@ -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;