Re:Writing comments about pointer ownership
by nice_byte on Sunday August 23, 2015 @04:38AM
(#10105036)
I think it should work if you define the ctor and dtor for BlackBox in a separate .cpp file where you include gadget.h.
The reason it fails to compile is probably that the implicitly generate constructor of BlackBox (which is inline, I guess) may need to call the dtor of unique_ptr in case something in the constructor throws an exception.
The reason it fails to compile is probably that the implicitly generate constructor of BlackBox (which is inline, I guess) may need to call the dtor of unique_ptr in case something in the constructor throws an exception.