1.1 --- a/lemon/concepts/maps.h Wed Sep 12 17:25:48 2012 +0200
1.2 +++ b/lemon/concepts/maps.h Thu Sep 13 11:56:19 2012 +0200
1.3 @@ -49,7 +49,7 @@
1.4
1.5 /// Returns the value associated with the given key.
1.6 Value operator[](const Key &) const {
1.7 - return *static_cast<Value *>(0);
1.8 + return *(static_cast<Value *>(0)+1);
1.9 }
1.10
1.11 template<typename _ReadMap>
1.12 @@ -68,6 +68,7 @@
1.13 const Key& key;
1.14 const typename _ReadMap::Key& own_key;
1.15 const _ReadMap& m;
1.16 + Constraints() {}
1.17 };
1.18
1.19 };
1.20 @@ -109,6 +110,7 @@
1.21 const typename _WriteMap::Key& own_key;
1.22 const typename _WriteMap::Value& own_val;
1.23 _WriteMap& m;
1.24 + Constraints() {}
1.25 };
1.26 };
1.27
1.28 @@ -129,7 +131,8 @@
1.29
1.30 /// Returns the value associated with the given key.
1.31 Value operator[](const Key &) const {
1.32 - return *static_cast<Value *>(0);
1.33 + Value *r = 0;
1.34 + return *r;
1.35 }
1.36
1.37 /// Sets the value associated with the given key.
1.38 @@ -169,12 +172,14 @@
1.39
1.40 /// Returns a reference to the value associated with the given key.
1.41 Reference operator[](const Key &) {
1.42 - return *static_cast<Value *>(0);
1.43 + Value *r = 0;
1.44 + return *r;
1.45 }
1.46
1.47 /// Returns a const reference to the value associated with the given key.
1.48 ConstReference operator[](const Key &) const {
1.49 - return *static_cast<Value *>(0);
1.50 + Value *r = 0;
1.51 + return *r;
1.52 }
1.53
1.54 /// Sets the value associated with the given key.
1.55 @@ -205,6 +210,7 @@
1.56 typename _ReferenceMap::Reference own_ref;
1.57 typename _ReferenceMap::ConstReference own_cref;
1.58 _ReferenceMap& m;
1.59 + Constraints() {}
1.60 };
1.61 };
1.62