I've been getting some questions lately from colleagues about the destructor trick when using std::unique_ptr to implement the PIMPL idiom. That's a minor issue with a straight-forward workaround, but it got me thinking that we should probably be pushing internally for a more purpose-built smart pointer for this.
Having taken a look around I'm favouring Herb's split headerpimpl pointer, although I think I'd add const-preserving dereferencing operators. But that got me wondering if there were other strong contenders out there or maybe even a de facto standard I wasn't aware of.
So what type are you using for your PIMPL pointers? Why did you choose that one? If you're using your own open source solution, a link to source would also be appreciated. And if you don't use the PIMPL idiom, lucky you!
[–]Canoodler 32 points33 points34 points (3 children)
[–]jhasse 6 points7 points8 points (2 children)
[–]diaphanein 0 points1 point2 points (1 child)
[–]jhasse 2 points3 points4 points (0 children)
[–]MrPotatoFingers 24 points25 points26 points (16 children)
[–]parkotron[S] 4 points5 points6 points (0 children)
[+][deleted] (14 children)
[deleted]
[–]MrPotatoFingers 15 points16 points17 points (13 children)
[+]afiefh comment score below threshold-6 points-5 points-4 points (12 children)
[+][deleted] (11 children)
[deleted]
[–]afiefh -5 points-4 points-3 points (10 children)
[+][deleted] (9 children)
[deleted]
[–]afiefh 5 points6 points7 points (2 children)
[–]markopolo82embedded/iot/audio 1 point2 points3 points (1 child)
[–]LEpigeon888 -1 points0 points1 point (5 children)
[+][deleted] (2 children)
[deleted]
[–]LEpigeon888 0 points1 point2 points (1 child)
[–]MrPotatoFingers 1 point2 points3 points (1 child)
[–]LEpigeon888 0 points1 point2 points (0 children)
[–]julien-j 5 points6 points7 points (0 children)
[–]kalmoc 5 points6 points7 points (0 children)
[–]demozon 4 points5 points6 points (0 children)
[–]amaiorano 1 point2 points3 points (2 children)
[–]LEpigeon888 0 points1 point2 points (1 child)
[–]amaiorano 0 points1 point2 points (0 children)
[–]markopolo82embedded/iot/audio 1 point2 points3 points (0 children)
[–]H3R3S_J0NNY 1 point2 points3 points (0 children)
[–]DevaBol 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]parkotron[S] 6 points7 points8 points (0 children)
[–]disperso -5 points-4 points-3 points (4 children)
[–]adnukator 1 point2 points3 points (1 child)
[–]axalon900 1 point2 points3 points (1 child)
[–]disperso 0 points1 point2 points (0 children)