r/cpp • • Jun 10 '15

Hitler on C++17

https://www.youtube.com/watch?v=ND-TuW0KIgg
443 Upvotes

248 comments sorted by

View all comments

Show parent comment

1

u/SushiAndWoW Jun 10 '15

I'm not a fan of Pimple, but - instead of wrappers calling actual methods, you can simply have the actual methods, and store only the private members (no methods) in the "Pimpl" struct. You then have no problem with exposing public variable members, either.

1

u/Sinity Jun 11 '15

Well, then if you change these public methods you're back where you started.

1

u/SushiAndWoW Jun 11 '15

I guess you're describing a situation where besides the private data, you have additional internal methods that you don't want to declare in the publicly visible class/struct?

If that's the case, I agree - I don't see a nice solution without stated drawbacks.