summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-04-13 18:29:01 +0200
committerJose <jose@zeroc.com>2016-04-13 18:30:47 +0200
commit40d56de4b7fe4a6148b2acaf1609a0a75491518b (patch)
tree5af9e70e30240860fdaf489964c4caa8ac2a1e49 /cpp/src/slice2cpp/Gen.cpp
parentUWP test alpha version fixes (diff)
downloadice-40d56de4b7fe4a6148b2acaf1609a0a75491518b.tar.bz2
ice-40d56de4b7fe4a6148b2acaf1609a0a75491518b.tar.xz
ice-40d56de4b7fe4a6148b2acaf1609a0a75491518b.zip
COMPILERFIX clang++ 7.3.0 crash when using default ctor in class derived from std::exception
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index de179f26d55..2190abd6fa8 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -5523,7 +5523,22 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
}
else
{
+ H.zeroIndent();
+ H << nl << "//";
+ H << nl << "// COMPILERFIX: Apple LLVM version 7.3.0 crash when using";
+ H << nl << "// default generated constructor in classes derived from";
+ H << nl << "// std::exception";
+ H << nl << "//";
+ H << nl << "#ifdef __APPLE__";
+ H.restoreIndent();
+ H << sp << nl << name << "() {};";
+ H.zeroIndent();
+ H << nl << "#else";
+ H.restoreIndent();
H << sp << nl << name << "() = default;";
+ H.zeroIndent();
+ H << nl << "#endif";
+ H.restoreIndent();
}
if(!allDataMembers.empty())