diff options
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 0b6c01ac6e7..220b5ccb70f 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3077,7 +3077,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(); }); +#else transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped)); +#endif StringList other; other.push_back(p->scoped()); other.push_back("::Ice::Object"); @@ -3217,9 +3221,12 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) if(!allOps.empty()) { StringList allOpNames; +#ifdef ICE_CPP11_COMPILER + transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), [](const auto& 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"); allOpNames.push_back("ice_isA"); @@ -6163,7 +6170,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(); }); +#else transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped)); +#endif StringList other; other.push_back(p->scoped()); other.push_back("::Ice::Object"); @@ -6184,7 +6195,11 @@ Slice::Gen::Cpp11DeclVisitor::visitClassDefStart(const ClassDefPtr& p) C << eb << ';'; StringList allOpNames; +#ifdef ICE_CPP11_COMPILER + transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), [](const auto& 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"); allOpNames.push_back("ice_isA"); @@ -7978,7 +7993,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(); }); +#else transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&Contained::scoped)); +#endif StringList other; other.push_back(p->scoped()); other.push_back("::Ice::Object"); @@ -8076,7 +8095,11 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefEnd(const ClassDefPtr& p) if(!allOps.empty()) { StringList allOpNames; +#ifdef ICE_CPP11_COMPILER + transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), [](const auto& 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"); allOpNames.push_back("ice_isA"); |