31 May
2016
31 May
'16
9:56 p.m.
On May 31, 2016, at 5:10 PM, Emil Dotchevski
On Tue, May 31, 2016 at 12:09 PM, Chris Glover
wrote: I sometimes don't pimpl an entire object. This might be because I have templates in the interface or because I need the functions to inline. Your solution doesn't allow me to do that.
One possibility is to use inheritance in the cpp file:
header:
struct foo { int critical_; };
cpp:
namespace { struct foo_: foo { int not_so_critiral_; }; }
Since this uses a derived class instead of a pointer, I've been calling this the "dimpl" idiom. :-) Josh