diff options
Diffstat (limited to 'cpp/src/IceStorm')
-rw-r--r-- | cpp/src/IceStorm/NodeI.cpp | 15 | ||||
-rw-r--r-- | cpp/src/IceStorm/Replica.h | 6 |
2 files changed, 21 insertions, 0 deletions
diff --git a/cpp/src/IceStorm/NodeI.cpp b/cpp/src/IceStorm/NodeI.cpp index 9933b18357a..f586edcaa86 100644 --- a/cpp/src/IceStorm/NodeI.cpp +++ b/cpp/src/IceStorm/NodeI.cpp @@ -107,6 +107,21 @@ GroupNodeInfo::operator==(const GroupNodeInfo& rhs) const return id == rhs.id; } +// +// COMPILER FIX: Clang using libc++ requires to define operator= +// +#if defined(__clang__) && defined(_LIBCPP_VERSION) +GroupNodeInfo& +GroupNodeInfo::operator=(const GroupNodeInfo& other) + +{ + const_cast<int&>(this->id) = other.id; + const_cast<LogUpdate&>(this->llu) = other.llu; + const_cast<Ice::ObjectPrx&>(this->observer) = other.observer; + return *this; +} +#endif + Replica::~Replica() { //cout << "~Replica" << endl; diff --git a/cpp/src/IceStorm/Replica.h b/cpp/src/IceStorm/Replica.h index 60600c778d8..7e131904bf1 100644 --- a/cpp/src/IceStorm/Replica.h +++ b/cpp/src/IceStorm/Replica.h @@ -22,6 +22,12 @@ struct GroupNodeInfo GroupNodeInfo(int i, LogUpdate l, const Ice::ObjectPrx& o = Ice::ObjectPrx()); bool operator<(const GroupNodeInfo& rhs) const; bool operator==(const GroupNodeInfo& rhs) const; + // + // COMPILER FIX: Clang using libc++ requires to define operator= + // +#if defined(__clang__) && defined(_LIBCPP_VERSION) + GroupNodeInfo& operator=(const GroupNodeInfo&); +#endif const int id; const LogUpdate llu; const Ice::ObjectPrx observer; |