diff options
author | Jose <jose@zeroc.com> | 2021-12-29 10:45:43 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2021-12-29 12:09:29 +0100 |
commit | 72dcb8749be9494563e035087d7a11c58d7458e1 (patch) | |
tree | adb351d6ca284a0e9210d102cd2ed8b063ac6137 /cpp/src/slice2swift/Gen.cpp | |
parent | Fixes for C++98 mapping build with C++17 mode or greater (diff) | |
download | ice-72dcb8749be9494563e035087d7a11c58d7458e1.tar.bz2 ice-72dcb8749be9494563e035087d7a11c58d7458e1.tar.xz ice-72dcb8749be9494563e035087d7a11c58d7458e1.zip |
Don't use auto with lambda methods
Diffstat (limited to 'cpp/src/slice2swift/Gen.cpp')
-rw-r--r-- | cpp/src/slice2swift/Gen.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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"); |