diff options
author | Morgan Deters <mdeters@gmail.com> | 2011-09-02 19:23:18 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2011-09-02 19:23:18 +0000 |
commit | 74770f1071e6102795393cf65dd0c651038db6b4 (patch) | |
tree | e1ae141b4d74bd7a603631830303fe3f1ea439d9 /src/context | |
parent | 487e610b88f2a634e3285886ff96717c103338de (diff) |
Ensure that assignment gestures through CDMap iterators like:
(*myCDMap.find(foo)).second = bar;
fail with a compile-time error (rather than being silently ignored, like
they had been).
Resolves bug #276.
Diffstat (limited to 'src/context')
-rw-r--r-- | src/context/cdmap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/context/cdmap.h b/src/context/cdmap.h index 1e7e931da..c71459835 100644 --- a/src/context/cdmap.h +++ b/src/context/cdmap.h @@ -514,8 +514,8 @@ public: } // Dereference operators. - std::pair<const Key, Data> operator*() const { - return std::pair<const Key, Data>(d_it->getKey(), d_it->get()); + std::pair<const Key, const Data> operator*() const { + return std::pair<const Key, const Data>(d_it->getKey(), d_it->get()); } // Prefix increment |