summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2021-12-29 10:45:43 +0100
committerJose <jose@zeroc.com>2021-12-29 12:09:29 +0100
commit72dcb8749be9494563e035087d7a11c58d7458e1 (patch)
treeadb351d6ca284a0e9210d102cd2ed8b063ac6137 /cpp/src
parentFixes for C++98 mapping build with C++17 mode or greater (diff)
downloadice-72dcb8749be9494563e035087d7a11c58d7458e1.tar.bz2
ice-72dcb8749be9494563e035087d7a11c58d7458e1.tar.xz
ice-72dcb8749be9494563e035087d7a11c58d7458e1.zip
Don't use auto with lambda methods
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/ConnectionFactory.cpp4
-rw-r--r--cpp/src/Ice/LocatorInfo.cpp2
-rw-r--r--cpp/src/Ice/ObjectAdapterFactory.cpp6
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp16
-rw-r--r--cpp/src/Ice/RouterInfo.cpp6
-rw-r--r--cpp/src/IceGrid/Database.cpp16
-rw-r--r--cpp/src/IceGrid/NodeSessionI.cpp2
-rw-r--r--cpp/src/Slice/Parser.cpp2
-rw-r--r--cpp/src/Slice/PythonUtil.cpp6
-rw-r--r--cpp/src/slice2cpp/Gen.cpp30
-rw-r--r--cpp/src/slice2cs/Gen.cpp24
-rw-r--r--cpp/src/slice2java/Gen.cpp12
-rw-r--r--cpp/src/slice2java/GenCompat.cpp18
-rw-r--r--cpp/src/slice2js/Gen.cpp6
-rw-r--r--cpp/src/slice2objc/Gen.cpp6
-rw-r--r--cpp/src/slice2swift/Gen.cpp16
16 files changed, 130 insertions, 42 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp
index 85821904220..da667001549 100644
--- a/cpp/src/Ice/ConnectionFactory.cpp
+++ b/cpp/src/Ice/ConnectionFactory.cpp
@@ -465,7 +465,7 @@ IceInternal::OutgoingConnectionFactory::findConnection(const vector<EndpointIPtr
{
#ifdef ICE_CPP11_COMPILER
auto connection = find(_connectionsByEndpoint, *p,
- [](const auto& conn)
+ [](const ConnectionIPtr& conn)
{
return conn->isActiveOrHolding();
});
@@ -503,7 +503,7 @@ IceInternal::OutgoingConnectionFactory::findConnection(const vector<ConnectorInf
#ifdef ICE_CPP11_COMPILER
auto connection = find(_connections, p->connector,
- [](const auto& conn)
+ [](const ConnectionIPtr& conn)
{
return conn->isActiveOrHolding();
});
diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp
index 654033f2311..347e1c718cc 100644
--- a/cpp/src/Ice/LocatorInfo.cpp
+++ b/cpp/src/Ice/LocatorInfo.cpp
@@ -134,7 +134,7 @@ IceInternal::LocatorManager::destroy()
IceUtil::Mutex::Lock sync(*this);
#ifdef ICE_CPP11_COMPILER
- for_each(_table.begin(), _table.end(), [](const auto& it){ it.second->destroy(); });
+ for_each(_table.begin(), _table.end(), [](pair<Ice::LocatorPrxPtr, LocatorInfoPtr> it){ it.second->destroy(); });
#else
for_each(_table.begin(), _table.end(), Ice::secondVoidMemFun<const LocatorPrx, LocatorInfo>(&LocatorInfo::destroy));
#endif
diff --git a/cpp/src/Ice/ObjectAdapterFactory.cpp b/cpp/src/Ice/ObjectAdapterFactory.cpp
index c9821adf2e8..b5f574c63a4 100644
--- a/cpp/src/Ice/ObjectAdapterFactory.cpp
+++ b/cpp/src/Ice/ObjectAdapterFactory.cpp
@@ -47,7 +47,7 @@ IceInternal::ObjectAdapterFactory::shutdown()
// deadlocks.
//
#ifdef ICE_CPP11_COMPILER
- for_each(adapters.begin(), adapters.end(), [](const auto& adapter) { adapter->deactivate(); });
+ for_each(adapters.begin(), adapters.end(), [](const ObjectAdapterIPtr& adapter) { adapter->deactivate(); });
#else
for_each(adapters.begin(), adapters.end(), IceUtil::voidMemFun(&ObjectAdapter::deactivate));
#endif
@@ -76,7 +76,7 @@ IceInternal::ObjectAdapterFactory::waitForShutdown()
// Now we wait for deactivation of each object adapter.
//
#ifdef ICE_CPP11_COMPILER
- for_each(adapters.begin(), adapters.end(), [](const auto& adapter) { adapter->waitForDeactivate(); });
+ for_each(adapters.begin(), adapters.end(), [](const ObjectAdapterIPtr& adapter) { adapter->waitForDeactivate(); });
#else
for_each(adapters.begin(), adapters.end(), IceUtil::voidMemFun(&ObjectAdapter::waitForDeactivate));
#endif
@@ -109,7 +109,7 @@ IceInternal::ObjectAdapterFactory::destroy()
// Now we destroy each object adapter.
//
#ifdef ICE_CPP11_COMPILER
- for_each(adapters.begin(), adapters.end(), [](const auto& adapter) { adapter->destroy(); });
+ for_each(adapters.begin(), adapters.end(), [](const ObjectAdapterIPtr& adapter) { adapter->destroy(); });
#else
for_each(adapters.begin(), adapters.end(), IceUtil::voidMemFun(&ObjectAdapter::destroy));
#endif
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index f41f1b54df4..9e9f561ac22 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -100,7 +100,7 @@ Ice::ObjectAdapterI::activate()
{
#ifdef ICE_CPP11_COMPILER
for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
- [](const auto& factory)
+ [](const IncomingConnectionFactoryPtr& factory)
{
factory->activate();
});
@@ -161,7 +161,7 @@ Ice::ObjectAdapterI::activate()
#ifdef ICE_CPP11_COMPILER
for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
- [](const auto& factory)
+ [](const IncomingConnectionFactoryPtr& factory)
{
factory->activate();
});
@@ -184,7 +184,7 @@ Ice::ObjectAdapterI::hold()
#ifdef ICE_CPP11_COMPILER
for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
- [](const auto& factory)
+ [](const IncomingConnectionFactoryPtr& factory)
{
factory->hold();
});
@@ -208,7 +208,7 @@ Ice::ObjectAdapterI::waitForHold()
#ifdef ICE_CPP11_COMPILER
for_each(incomingConnectionFactories.begin(), incomingConnectionFactories.end(),
- [](const auto& factory)
+ [](const IncomingConnectionFactoryPtr& factory)
{
factory->waitUntilHolding();
});
@@ -271,7 +271,7 @@ Ice::ObjectAdapterI::deactivate() ICE_NOEXCEPT
#ifdef ICE_CPP11_COMPILER
for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
- [](const auto& factory)
+ [](const IncomingConnectionFactoryPtr& factory)
{
factory->destroy();
});
@@ -319,7 +319,7 @@ Ice::ObjectAdapterI::waitForDeactivate() ICE_NOEXCEPT
//
#ifdef ICE_CPP11_COMPILER
for_each(incomingConnectionFactories.begin(), incomingConnectionFactories.end(),
- [](const auto& factory)
+ [](const IncomingConnectionFactoryPtr& factory)
{
factory->waitUntilFinished();
});
@@ -640,7 +640,7 @@ Ice::ObjectAdapterI::getEndpoints() const ICE_NOEXCEPT
transform(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
back_inserter(endpoints),
#ifdef ICE_CPP11_COMPILER
- [](const auto& factory)
+ [](const IncomingConnectionFactoryPtr& factory)
{
return factory->endpoint();
});
@@ -833,7 +833,7 @@ Ice::ObjectAdapterI::updateConnectionObservers()
}
#ifdef ICE_CPP11_COMPILER
for_each(f.begin(), f.end(),
- [](const auto& factory)
+ [](const IncomingConnectionFactoryPtr& factory)
{
factory->updateConnectionObservers();
});
diff --git a/cpp/src/Ice/RouterInfo.cpp b/cpp/src/Ice/RouterInfo.cpp
index ed5c6a3b54b..82de4631ead 100644
--- a/cpp/src/Ice/RouterInfo.cpp
+++ b/cpp/src/Ice/RouterInfo.cpp
@@ -26,7 +26,11 @@ IceInternal::RouterManager::destroy()
{
IceUtil::Mutex::Lock sync(*this);
#ifdef ICE_CPP11_COMPILER
- for_each(_table.begin(), _table.end(), [](const auto& it){ it.second->destroy(); });
+ for_each(_table.begin(), _table.end(),
+ [](const pair<RouterPrxPtr, RouterInfoPtr> it)
+ {
+ it.second->destroy();
+ });
#else
for_each(_table.begin(), _table.end(), Ice::secondVoidMemFun<const RouterPrx, RouterInfo>(&RouterInfo::destroy));
#endif
diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp
index 7dcb555fb30..1552c823117 100644
--- a/cpp/src/IceGrid/Database.cpp
+++ b/cpp/src/IceGrid/Database.cpp
@@ -434,7 +434,7 @@ Database::syncApplications(const ApplicationInfoSeq& newApplications, Ice::Long
}
#ifdef ICE_CPP11_COMPILER
- for_each(entries.begin(), entries.end(), [](const auto& it) {it->sync(); });
+ for_each(entries.begin(), entries.end(), [](const ServerEntryPtr& it) {it->sync(); });
#else
for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::sync));
#endif
@@ -618,7 +618,7 @@ Database::addApplication(const ApplicationInfo& info, AdminSessionI* session, Ic
startUpdating(info.descriptor.name, info.uuid, info.revision);
#ifdef ICE_CPP11_COMPILER
- for_each(entries.begin(), entries.end(), [](const auto& it) { it->sync(); });
+ for_each(entries.begin(), entries.end(), [](const ServerEntryPtr& it) { it->sync(); });
#else
for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::sync));
#endif
@@ -676,7 +676,7 @@ Database::addApplication(const ApplicationInfo& info, AdminSessionI* session, Ic
txn.commit();
#ifdef ICE_CPP11_COMPILER
- for_each(entries.begin(), entries.end(), [](const auto& it) { it->sync(); });
+ for_each(entries.begin(), entries.end(), [](const ServerEntryPtr& it) { it->sync(); });
#else
for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::sync));
#endif
@@ -694,7 +694,7 @@ Database::addApplication(const ApplicationInfo& info, AdminSessionI* session, Ic
_applicationObserverTopic->waitForSyncedSubscribers(serial);
#ifdef ICE_CPP11_COMPILER
- for_each(entries.begin(), entries.end(), [](const auto& it) { it->waitForSyncNoThrow(); });
+ for_each(entries.begin(), entries.end(), [](const ServerEntryPtr& it) { it->waitForSyncNoThrow(); });
#else
for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::waitForSyncNoThrow));
#endif
@@ -886,7 +886,7 @@ Database::removeApplication(const string& name, AdminSessionI* session, Ice::Lon
startUpdating(name, appInfo.uuid, appInfo.revision);
#ifdef ICE_CPP11_COMPILER
- for_each(entries.begin(), entries.end(), [](const auto& it) { it->sync(); });
+ for_each(entries.begin(), entries.end(), [](const ServerEntryPtr& it) { it->sync(); });
#else
for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::sync));
#endif
@@ -2571,7 +2571,7 @@ Database::finishApplicationUpdate(const ApplicationUpdateInfo& update,
reload(previousAppHelper, appHelper, entries, oldApp.uuid, oldApp.revision + 1, noRestart);
#ifdef ICE_CPP11_COMPILER
- for_each(entries.begin(), entries.end(), [](const auto& it) { it->sync(); });
+ for_each(entries.begin(), entries.end(), [](const ServerEntryPtr& it) { it->sync(); });
#else
for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::sync));
#endif
@@ -2661,7 +2661,7 @@ Database::finishApplicationUpdate(const ApplicationUpdateInfo& update,
p->unmarkUpdated();
#ifdef ICE_CPP11_COMPILER
- for_each(entries.begin(), entries.end(), [](const auto& it) { it->sync(); });
+ for_each(entries.begin(), entries.end(), [](const ServerEntryPtr& it) { it->sync(); });
#else
for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::sync));
#endif
@@ -2669,7 +2669,7 @@ Database::finishApplicationUpdate(const ApplicationUpdateInfo& update,
}
_applicationObserverTopic->waitForSyncedSubscribers(serial); // Wait for subscriber to be updated.
#ifdef ICE_CPP11_COMPILER
- for_each(entries.begin(), entries.end(), [](const auto& it) { it->waitForSyncNoThrow(); });
+ for_each(entries.begin(), entries.end(), [](const ServerEntryPtr& it) { it->waitForSyncNoThrow(); });
#else
for_each(entries.begin(), entries.end(), IceUtil::voidMemFun(&ServerEntry::waitForSyncNoThrow));
#endif
diff --git a/cpp/src/IceGrid/NodeSessionI.cpp b/cpp/src/IceGrid/NodeSessionI.cpp
index 5cfa991ef1b..2676b07a7fe 100644
--- a/cpp/src/IceGrid/NodeSessionI.cpp
+++ b/cpp/src/IceGrid/NodeSessionI.cpp
@@ -369,7 +369,7 @@ NodeSessionI::destroyImpl(bool shutdown)
ServerEntrySeq servers = _database->getNode(_info->name)->getServers();
#ifdef ICE_CPP11_COMPILER
- for_each(servers.begin(), servers.end(), [](const auto& it) {it->unsync(); });
+ for_each(servers.begin(), servers.end(), [](const ServerEntryPtr& it) {it->unsync(); });
#else
for_each(servers.begin(), servers.end(), IceUtil::voidMemFun(&ServerEntry::unsync));
#endif
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index 81b840c43b5..814066e058a 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -1108,7 +1108,7 @@ void
Slice::Container::destroy()
{
#ifdef ICE_CPP11_COMPILER
- for_each(_contents.begin(), _contents.end(), [](const auto& it) { it->destroy(); });
+ for_each(_contents.begin(), _contents.end(), [](const SyntaxTreeBasePtr& it) { it->destroy(); });
#else
for_each(_contents.begin(), _contents.end(), ::IceUtil::voidMemFun(&SyntaxTreeBase::destroy));
#endif
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 5826c4d5871..ad40a0e34c7 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -950,7 +950,11 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassList allBases = p->allBases();
StringList ids;
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), IceUtil::constMemFun(&Contained::scoped));
#endif
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 220b5ccb70f..3cf59d4dac4 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -3078,7 +3078,11 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassList allBases = p->allBases();
StringList ids;
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped));
#endif
@@ -6171,7 +6175,11 @@ Slice::Gen::Cpp11DeclVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassList allBases = p->allBases();
StringList ids;
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped));
#endif
@@ -6196,7 +6204,11 @@ Slice::Gen::Cpp11DeclVisitor::visitClassDefStart(const ClassDefPtr& p)
StringList allOpNames;
#ifdef ICE_CPP11_COMPILER
- transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), [](const auto& it) { return it->name(); });
+ transform(allOps.begin(), allOps.end(), back_inserter(allOpNames),
+ [](const ContainedPtr& it)
+ {
+ return it->name();
+ });
#else
transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), ::IceUtil::constMemFun(&Contained::name));
#endif
@@ -7994,7 +8006,11 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassList allBases = p->allBases();
StringList ids;
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped));
#endif
@@ -8096,7 +8112,11 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefEnd(const ClassDefPtr& p)
{
StringList allOpNames;
#ifdef ICE_CPP11_COMPILER
- transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), [](const auto& it) { return it->name(); });
+ transform(allOps.begin(), allOps.end(), back_inserter(allOpNames),
+ [](const ContainedPtr& it)
+ {
+ return it->name();
+ });
#else
transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), ::IceUtil::constMemFun(&Contained::name));
#endif
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 71848e82fe9..14024ff60d2 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -394,7 +394,11 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
ClassList bases = p->bases();
bool hasBaseClass = !bases.empty() && !bases.front()->isInterface();
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), constMemFun(&Contained::scoped));
#endif
@@ -651,7 +655,11 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
{
StringList allOpNames;
#ifdef ICE_CPP11_COMPILER
- transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), [](const auto& it) { return it->name(); });
+ transform(allOps.begin(), allOps.end(), back_inserter(allOpNames),
+ [](const ContainedPtr& it)
+ {
+ return it->name();
+ });
#else
transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), constMemFun(&Contained::name));
#endif
@@ -771,7 +779,11 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
ClassList bases = p->bases();
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), constMemFun(&Contained::scoped));
#endif
@@ -4896,7 +4908,11 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassList allBases = p->allBases();
StringList ids;
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped));
#endif
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index ae85e3731b7..011f11e0e4b 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -1146,7 +1146,11 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
ClassList allBases = p->allBases();
StringList ids;
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), constMemFun(&Contained::scoped));
#endif
@@ -1393,7 +1397,11 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
{
StringList allOpNames;
#ifdef ICE_CPP11_COMPILER
- transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), [](const auto& it) { return it->name(); });
+ transform(allOps.begin(), allOps.end(), back_inserter(allOpNames),
+ [](const ContainedPtr& it)
+ {
+ return it->name();
+ });
#else
transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), constMemFun(&Contained::name));
#endif
diff --git a/cpp/src/slice2java/GenCompat.cpp b/cpp/src/slice2java/GenCompat.cpp
index a9f67d0ed08..5d2985afce5 100644
--- a/cpp/src/slice2java/GenCompat.cpp
+++ b/cpp/src/slice2java/GenCompat.cpp
@@ -1108,7 +1108,11 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
ClassList allBases = p->allBases();
StringList ids;
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), constMemFun(&Contained::scoped));
#endif
@@ -1544,7 +1548,11 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
{
StringList allOpNames;
#ifdef ICE_CPP11_COMPILER
- transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), [](const auto& it) { return it->name(); });
+ transform(allOps.begin(), allOps.end(), back_inserter(allOpNames),
+ [](const ContainedPtr& it)
+ {
+ return it->name();
+ });
#else
transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), constMemFun(&Contained::name));
#endif
@@ -4888,7 +4896,11 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassList allBases = p->allBases();
StringList ids;
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), constMemFun(&Contained::scoped));
#endif
diff --git a/cpp/src/slice2js/Gen.cpp b/cpp/src/slice2js/Gen.cpp
index 7edc5a42089..4d6cf871303 100644
--- a/cpp/src/slice2js/Gen.cpp
+++ b/cpp/src/slice2js/Gen.cpp
@@ -1331,7 +1331,11 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassList allBases = p->allBases();
StringList ids;
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped));
#endif
diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp
index 61d3b92ae2e..c52ea9bbf17 100644
--- a/cpp/src/slice2objc/Gen.cpp
+++ b/cpp/src/slice2objc/Gen.cpp
@@ -213,7 +213,11 @@ Slice::ObjCVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p)
StringList ids;
#ifdef ICE_CPP11_COMPILER
- transform(allBases.begin(), allBases.end(), back_inserter(ids), [](const auto& it) { return it->scoped(); });
+ transform(allBases.begin(), allBases.end(), back_inserter(ids),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped));
#endif
diff --git a/cpp/src/slice2swift/Gen.cpp b/cpp/src/slice2swift/Gen.cpp
index 7dd2ecc8aec..233f017edd3 100644
--- a/cpp/src/slice2swift/Gen.cpp
+++ b/cpp/src/slice2swift/Gen.cpp
@@ -324,7 +324,15 @@ Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassList allBases = p->allBases();
StringList allIds;
+#ifdef ICE_CPP11_COMPILER
+ transform(allBases.begin(), allBases.end(), back_inserter(allIds),
+ [](const ContainedPtr& it)
+ {
+ return it->scoped();
+ });
+#else
transform(allBases.begin(), allBases.end(), back_inserter(allIds), ::IceUtil::constMemFun(&Contained::scoped));
+#endif
allIds.push_back(p->scoped());
allIds.push_back("::Ice::Object");
allIds.sort();
@@ -1609,7 +1617,15 @@ Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
const OperationList allOps = p->allOperations();
StringList allOpNames;
+#ifdef ICE_CPP11_COMPILER
+ transform(allOps.begin(), allOps.end(), back_inserter(allOpNames),
+ [](const ContainedPtr& it)
+ {
+ return it->name();
+ });
+#else
transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), ::IceUtil::constMemFun(&Contained::name));
+#endif
allOpNames.push_back("ice_id");
allOpNames.push_back("ice_ids");