diff options
author | Joe George <joe@zeroc.com> | 2015-12-24 10:23:15 -0500 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2015-12-24 10:23:15 -0500 |
commit | 2eac583853b1fa146eaa62491bd4399be60d4451 (patch) | |
tree | 601ae579965efe648402fc3002a7b5ace6118226 /cpp/src/slice2cpp/Gen.cpp | |
parent | ICE-6898 - "Delegate" functions for ACM callbacks (diff) | |
parent | Fix website links (diff) | |
download | ice-2eac583853b1fa146eaa62491bd4399be60d4451.tar.bz2 ice-2eac583853b1fa146eaa62491bd4399be60d4451.tar.xz ice-2eac583853b1fa146eaa62491bd4399be60d4451.zip |
Merge remote-tracking branch 'origin/3.6'
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 4cc4eb06fbc..37ac01ccc8e 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3389,7 +3389,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) if(!inProtected) { H.dec(); - H << sp << nl << "protected:"; + H << nl << "protected:"; H.inc(); inProtected = true; } @@ -3397,7 +3397,9 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) if(!_doneStaticSymbol) { + H.dec(); H << sp << nl << "friend class " << p->name() << "__staticInit;"; + H.inc(); } } @@ -3425,6 +3427,14 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) // For a Slice class Foo, we instantiate a dummy class Foo__staticInit instead of using a static // Foo instance directly because Foo has a protected destructor. // + H.zeroIndent(); + H << nl << "#if !defined(_MSC_VER) || (_MSC_VER < 1900)"; + H.restoreIndent(); + H << nl << "//"; + H << nl << "// COMPILERFIX: Visual Studio 2015 update 1 fails to access"; + H << nl << "// the proected destructor from a friend class."; + H << nl << "//"; + H << sp << nl << "class " << p->name() << "__staticInit"; H << sb; H.dec(); @@ -3434,6 +3444,10 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) H << eb << ';'; _doneStaticSymbol = true; H << sp << nl << "static " << p->name() << "__staticInit _" << p->name() << "_init;"; + + H.zeroIndent(); + H << nl << "#endif"; + H.restoreIndent(); } if(p->isLocal()) |