summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Reference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Reference.cpp')
-rw-r--r--cpp/src/Ice/Reference.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index bc635c8e0a9..737d4bdbfe6 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -1354,8 +1354,12 @@ IceInternal::RoutableReference::operator==(const Reference& r) const
return false;
}
#ifdef ICE_CPP11_MAPPING
- if(!equal(_endpoints.begin(), _endpoints.end(), rhs->_endpoints.begin(), rhs->_endpoints.end(),
- Ice::TargetEquals<shared_ptr<EndpointI>>()))
+ //
+ // TODO: With C++14 we could use the vesion that receives four iterators and we don't need to explicitly
+ // check the sizesa are equal.
+ //
+ if(_endpoints.size() != rhs->_endpoints.size() ||
+ !equal(_endpoints.begin(), _endpoints.end(), rhs->_endpoints.begin(), Ice::TargetEquals<shared_ptr<EndpointI>>()))
#else
if(_endpoints != rhs->_endpoints)
#endif