Easier checking in DEBUG mode
authordeba
Tue, 07 Feb 2006 09:32:55 +0000
changeset 196665765fb5eb2f
parent 1965 71b3bc042c47
child 1967 5d81ba873b90
Easier checking in DEBUG mode

I hope we should not test ArrayMap longer

The vector map checks its limits in debug mode what
helps us to find the bad memory accesses in the maps
lemon/bits/default_map.h
     1.1 --- a/lemon/bits/default_map.h	Tue Feb 07 09:20:47 2006 +0000
     1.2 +++ b/lemon/bits/default_map.h	Tue Feb 07 09:32:55 2006 +0000
     1.3 @@ -29,13 +29,23 @@
     1.4  ///their elements dynamically.
     1.5  
     1.6  namespace lemon {
     1.7 +  
     1.8 +#ifndef GLIBCXX_DEBUG
     1.9  
    1.10 +  template <typename _Graph, typename _Item, typename _Value>
    1.11 +  struct DefaultMapSelector {
    1.12 +    typedef ArrayMap<_Graph, _Item, _Value> Map;
    1.13 +  };
    1.14 +
    1.15 +#else
    1.16  
    1.17    template <typename _Graph, typename _Item, typename _Value>
    1.18    struct DefaultMapSelector {
    1.19      typedef VectorMap<_Graph, _Item, _Value> Map;
    1.20    };
    1.21  
    1.22 +#endif
    1.23 +
    1.24    // bool
    1.25    template <typename _Graph, typename _Item>
    1.26    struct DefaultMapSelector<_Graph, _Item, bool> {