1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0031680: Configuration - Compilation Fails With G++ 10.1, LD 2.34 and Link-Time Optimization

Added a non-inline empty virtual destructor to LDOM_OSStream to force vtable generation in one
translation unit only.
This commit is contained in:
Benjamin Bihler 2020-07-21 13:37:03 +02:00 committed by bugmaster
parent dbc8becff4
commit 6531dfeacd
2 changed files with 10 additions and 0 deletions

View File

@ -161,3 +161,11 @@ LDOM_OSStream::LDOM_OSStream (const Standard_Integer theMaxBuf)
{ {
init(&myBuffer); init(&myBuffer);
} }
//=======================================================================
//function : ~LDOM_OSStream()
//purpose : Destructor - for g++ vtable generation in *this* translation unit
//=======================================================================
LDOM_OSStream::~LDOM_OSStream()
{
}

View File

@ -102,6 +102,8 @@ public:
//! Constructor //! Constructor
Standard_EXPORT LDOM_OSStream(const Standard_Integer theMaxBuf); Standard_EXPORT LDOM_OSStream(const Standard_Integer theMaxBuf);
Standard_EXPORT virtual ~LDOM_OSStream();
Standard_CString str () const {return myBuffer.str();} Standard_CString str () const {return myBuffer.str();}
Standard_Integer Length () const { return myBuffer.Length(); } Standard_Integer Length () const { return myBuffer.Length(); }