[Lemon-commits] [lemon_svn] deba: r2543 - hugo/trunk/lemon/bits
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:53:26 CET 2006
Author: deba
Date: Tue Feb 7 10:32:55 2006
New Revision: 2543
Modified:
hugo/trunk/lemon/bits/default_map.h
Log:
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
Modified: hugo/trunk/lemon/bits/default_map.h
==============================================================================
--- hugo/trunk/lemon/bits/default_map.h (original)
+++ hugo/trunk/lemon/bits/default_map.h Tue Feb 7 10:32:55 2006
@@ -29,13 +29,23 @@
///their elements dynamically.
namespace lemon {
+
+#ifndef GLIBCXX_DEBUG
+ template <typename _Graph, typename _Item, typename _Value>
+ struct DefaultMapSelector {
+ typedef ArrayMap<_Graph, _Item, _Value> Map;
+ };
+
+#else
template <typename _Graph, typename _Item, typename _Value>
struct DefaultMapSelector {
typedef VectorMap<_Graph, _Item, _Value> Map;
};
+#endif
+
// bool
template <typename _Graph, typename _Item>
struct DefaultMapSelector<_Graph, _Item, bool> {
More information about the Lemon-commits
mailing list