
On 2016-05-29 00:25, Chris Glover wrote:
I would personally use this, I am sure of that, as I type this in by hand using unique_ptr all the time.
Glad to hear that... and IMO the proposed design does have advantage over unique_ptr-based pimpl as IMO unique_ptr hardly has any advantage over the raw pointer -- even the destructor has to be explicit non-default and non-inlined. When the proposed design IMO cuts down on implementation minutia.
One addition I would like to see is a version where the heap allocation is avoided by storing an internal buffer in the base class.
I feel that the proposed policy/manager-based design allows us to supply a manager as per your requirements. I personally have never used such design but I am certainly eager to see it implemented, tested and incorporated... if pimpl gets its "foot in the Boost door" so to speak.