Define destructor in .cpp to handle forward-def field
The EclipseSummary field is just forward declared in the header, and the compiler cannot create a proper destructor based on just that. If we define it in the compilation unit, it will get instantiated there once and for all and the compiler won't try to create it (and leave it to the linker to sort out duplicates) everywhere the header is used (which may be in another module, even). This is similar to commit 18b9f2b for SimulatorOutput.
This commit is contained in:
@@ -938,4 +938,7 @@ EclipseWriter::EclipseWriter (
|
||||
}
|
||||
}
|
||||
|
||||
// default destructor is OK, just need to be defined
|
||||
EclipseWriter::~EclipseWriter() { }
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
Reference in New Issue
Block a user