diff options
author | Joe George <joe@zeroc.com> | 2021-03-29 10:01:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 10:01:10 -0400 |
commit | c095b7f9c123e1b07bf3844e7aaad9bb1a56d143 (patch) | |
tree | b31a58b033e02a10f47279985f59247839efdd65 /cpp/src/Slice/PythonUtil.cpp | |
parent | Fix whitespace (diff) | |
download | ice-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/Slice/PythonUtil.cpp')
-rw-r--r-- | cpp/src/Slice/PythonUtil.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index 5649f9797d4..73753088677 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -2999,7 +2999,11 @@ Slice::Python::fixIdent(const string& ident) return lookupKwd(ident); } vector<string> ids = splitScopedName(ident); +#ifdef ICE_CPP11_COMPILER + transform(ids.begin(), ids.end(), ids.begin(), [](const string& id) -> string { return lookupKwd(id); }); +#else transform(ids.begin(), ids.end(), ids.begin(), ptr_fun(lookupKwd)); +#endif stringstream result; for(vector<string>::const_iterator i = ids.begin(); i != ids.end(); ++i) { |