diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-02 22:13:15 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-02 22:13:15 +0000 |
commit | 996d5f6c4e21d3d8688674f20e6f4318e3ace607 (patch) | |
tree | be6a3d80f2cab11cd39d0f55bd4bc55793a2e735 /sca-cpp/trunk/kernel/monad.hpp | |
parent | dda9255a5c9336cd3078f85f02e88120563ad304 (diff) |
Cleaned up lifecycle handling of objects that hold library and file resources. Fixed pool stack initialization concurrency issue. Re-enabled watch strings to help watch compound values in debugger.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@895305 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/kernel/monad.hpp')
-rw-r--r-- | sca-cpp/trunk/kernel/monad.hpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sca-cpp/trunk/kernel/monad.hpp b/sca-cpp/trunk/kernel/monad.hpp index d2057cf367..15029b20ec 100644 --- a/sca-cpp/trunk/kernel/monad.hpp +++ b/sca-cpp/trunk/kernel/monad.hpp @@ -213,6 +213,15 @@ public: failable(const failable<V, F>& m) : hasv(m.hasv), v(m.v), f(m.f) { } + const failable<V, F>& operator=(const failable<V, F>& m) { + if (&m == this) + return *this; + hasv = m.hasv; + v = m.v; + f = m.f; + return *this; + } + const bool operator!=(const failable<V, F>& m) const { return !this->operator==(m); } @@ -229,11 +238,6 @@ private: failable(const bool hasv, const F& f) : hasv(hasv), f(f) { } - // Prevent mutation - const failable<V, F>& operator=(const failable<V, F>& m) { - return *this; - } - template<typename A, typename B> friend const bool hasContent(const failable<A, B>& m); template<typename A, typename B> friend const A content(const failable<A, B>& m); template<typename A, typename B> friend const B reason(const failable<A, B>& m); |