diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-10-12 14:09:54 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-10-12 14:09:54 +0000 |
commit | ec320b78deaaf31bdae1b8b048f66cfb1b3a4197 (patch) | |
tree | bf5fc292d26e49de97fe6c2eff6e2667d56c1895 /src/context/cdo.h | |
parent | b4fb5a6ad511f20ff88d2bf78194ef2e65dbde39 (diff) |
check last result in (get-assignment); some context cleanup
Diffstat (limited to 'src/context/cdo.h')
-rw-r--r-- | src/context/cdo.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/context/cdo.h b/src/context/cdo.h index ba4b368a8..f4c4a7e29 100644 --- a/src/context/cdo.h +++ b/src/context/cdo.h @@ -143,11 +143,16 @@ public: const T& get() const { return d_data; } /** - * For convenience, define operator T to be the same as get(). + * For convenience, define operator T() to be the same as get(). */ operator T() { return get(); } /** + * For convenience, define operator const T() to be the same as get(). + */ + operator const T() const { return get(); } + + /** * For convenience, define operator= that takes an object of type T. */ CDO<T>& operator=(const T& data) { |