# HG changeset patch # User Peter Kovacs # Date 2008-01-09 00:40:21 # Node ID ff9bac2351bf7ab42cf7e967bcc4a89fb97a577d # Parent afb5325d6211762a0821465cdf6c925896934c83 Minor bug fix in maps.h. Fixed the existing two variants of stdMap() and added two new variants. diff --git a/lemon/maps.h b/lemon/maps.h --- a/lemon/maps.h +++ b/lemon/maps.h @@ -250,20 +250,41 @@ ///This function just returns a \c StdMap class with specified ///default value. ///\relates StdMap - template > + template inline StdMap stdMap(const V& value = V()) { return StdMap(value); } + + ///Returns a \c StdMap class + + ///This function just returns a \c StdMap class with specified + ///default value. + ///\relates StdMap + template + inline StdMap > stdMap(const V& value = V()) { + return StdMap >(value); + } + + ///Returns a \c StdMap class created from an appropriate std::map + + ///This function just returns a \c StdMap class created from an + ///appropriate std::map. + ///\relates StdMap + template + inline StdMap stdMap( const std::map &map, + const V& value = V() ) { + return StdMap(map, value); + } ///Returns a \c StdMap class created from an appropriate std::map ///This function just returns a \c StdMap class created from an ///appropriate std::map. ///\relates StdMap - template > - inline StdMap stdMap( const std::map &map, - const V& value = V() ) { - return StdMap(map, value); + template + inline StdMap > stdMap( const std::map > &map, + const V& value = V() ) { + return StdMap >(map, value); } /// \brief Map for storing values for keys from the range [0..size-1]