3 ms·
scoped_ptr has the same issue due to the implicit destructor needing to know how to destroy the thing being held. The trick is you need to explicitly define you
by hermitdev 9y ago
scoped_ptr has the same issue due to the implicit destructor needing to know how to destroy the thing being held. The trick is you need to explicitly define your destructor (and it's implementation needs to have full knowledge of what it's pointing to). It doesn't have to do anything - ideally, it should be empty. This is known as the PIMPL idiom, or Cheshire Cat.
- ben0x539 8y agowow somehow i was sure i could get out of that just by having the destructor of the containing class in a separate compilation unit, that's unfortunate.