summaryrefslogtreecommitdiff
path: root/cpp/src/slice2confluence/Gen.cpp
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2021-03-29 10:01:10 -0400
committerGitHub <noreply@github.com>2021-03-29 10:01:10 -0400
commitc095b7f9c123e1b07bf3844e7aaad9bb1a56d143 (patch)
treeb31a58b033e02a10f47279985f59247839efdd65 /cpp/src/slice2confluence/Gen.cpp
parentFix whitespace (diff)
downloadice-c095b7f9c123e1b07bf3844e7aaad9bb1a56d143.tar.bz2
ice-c095b7f9c123e1b07bf3844e7aaad9bb1a56d143.tar.xz
ice-c095b7f9c123e1b07bf3844e7aaad9bb1a56d143.zip
Support for building C++98 with a C++11 compiler (#1267)
Fixes #1266
Diffstat (limited to 'cpp/src/slice2confluence/Gen.cpp')
-rw-r--r--cpp/src/slice2confluence/Gen.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp/src/slice2confluence/Gen.cpp b/cpp/src/slice2confluence/Gen.cpp
index 5cc4621b3d9..9127af21794 100644
--- a/cpp/src/slice2confluence/Gen.cpp
+++ b/cpp/src/slice2confluence/Gen.cpp
@@ -2301,10 +2301,23 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p)
ClassList classesAndInterfaces = p->classes();
ClassList classes;
ClassList interfaces;
+#ifdef ICE_CPP11_COMPILER
+ remove_copy_if(classesAndInterfaces.begin(), classesAndInterfaces.end(), back_inserter(classes),
+ [](const ClassDefPtr& classDef)
+ {
+ return !classDef->isInterface();
+ });
+ remove_copy_if(classesAndInterfaces.begin(), classesAndInterfaces.end(), back_inserter(interfaces),
+ [](const ClassDefPtr& classDef)
+ {
+ return !classDef->isInterface();
+ });
+#else
remove_copy_if(classesAndInterfaces.begin(), classesAndInterfaces.end(), back_inserter(classes),
::IceUtil::constMemFun(&ClassDef::isInterface));
remove_copy_if(classesAndInterfaces.begin(), classesAndInterfaces.end(), back_inserter(interfaces),
not1(::IceUtil::constMemFun(&ClassDef::isInterface)));
+#endif
if(!classes.empty())
{