gravatar
kpeter (Peter Kovacs)
kpeter@inf.elte.hu
Minor bug fix in maps.h. Fixed the existing two variants of stdMap() and added two new variants.
0 1 0
default
1 file changed with 23 insertions and 2 deletions:
↑ Collapse diff ↑
Show white space 2 line context
... ...
@@ -252,3 +252,3 @@
252 252
  ///\relates StdMap
253
  template<typename K, typename V, typename Compare = std::less<K> > 
253
  template<typename K, typename V, typename Compare> 
254 254
  inline StdMap<K, V, Compare> stdMap(const V& value = V()) {
... ...
@@ -257,2 +257,12 @@
257 257

	
258
  ///Returns a \c StdMap class
259

	
260
  ///This function just returns a \c StdMap class with specified 
261
  ///default value.
262
  ///\relates StdMap
263
  template<typename K, typename V> 
264
  inline StdMap<K, V, std::less<K> > stdMap(const V& value = V()) {
265
    return StdMap<K, V, std::less<K> >(value);
266
  }
267
  
258 268
  ///Returns a \c StdMap class created from an appropriate std::map
... ...
@@ -262,3 +272,3 @@
262 272
  ///\relates StdMap
263
  template<typename K, typename V, typename Compare = std::less<K> > 
273
  template<typename K, typename V, typename Compare> 
264 274
  inline StdMap<K, V, Compare> stdMap( const std::map<K, V, Compare> &map, 
... ...
@@ -268,2 +278,13 @@
268 278

	
279
  ///Returns a \c StdMap class created from an appropriate std::map
280

	
281
  ///This function just returns a \c StdMap class created from an 
282
  ///appropriate std::map.
283
  ///\relates StdMap
284
  template<typename K, typename V> 
285
  inline StdMap<K, V, std::less<K> > stdMap( const std::map<K, V, std::less<K> > &map, 
286
                                             const V& value = V() ) {
287
    return StdMap<K, V, std::less<K> >(map, value);
288
  }
289

	
269 290
  /// \brief Map for storing values for keys from the range <tt>[0..size-1]</tt>
0 comments (0 inline)