Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Hide the destructor of resource::Model
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 4 Jun 2019 09:57:18 +0000 (11:57 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 4 Jun 2019 09:57:22 +0000 (11:57 +0200)
commit981908668a67f1ea5a668df4dc219fdfd73f8ff4
tree5f560849f8d25a922140447c3c1069ee3e500c8c
parent7d5154294d0c97a3690134cc5d3a9900189055cf
Hide the destructor of resource::Model

If "~Model() = default" is in the header file, the compilation fails
with the following message:

 /usr/include/simgrid/kernel/resource/Model.hpp:35:11:   required from here
 /usr/include/c++/6/bits/unique_ptr.h:74:22: error: invalid application of 'sizeof' to incomplete type 'simgrid::kernel::lmm::System'
   static_assert(sizeof(_Tp)>0,

That's too bad because simgrid::kernel::lmm::System is not a public
type. This fails in particular when compiling simgrid-FMI.

Hiding the destructor in the cpp as done with this commit works better
because lmm::System is visible from Model.cpp
include/simgrid/kernel/resource/Model.hpp
src/kernel/resource/Model.cpp