From c095b7f9c123e1b07bf3844e7aaad9bb1a56d143 Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 29 Mar 2021 10:01:10 -0400 Subject: Support for building C++98 with a C++11 compiler (#1267) Fixes #1266 --- cpp/src/Slice/PythonUtil.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpp/src/Slice/PythonUtil.cpp') 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 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::const_iterator i = ids.begin(); i != ids.end(); ++i) { -- cgit v1.2.3