GotW #100 demonstrated the best way to express the Pimpl idiom using only standard C++11 features: Guru Question Is it possible to make the widget code easier to write by wrapping the Pimpl pattern in some sort of library helper? If so, how? Try to make the widget code as convenient and concise as possible [...]
Archive for the ‘GotW’ Category
GotW #101: Compilation Firewalls, Part 2 (Difficulty: 8/10)
Posted in C++, GotW on 2011-11-16 | 10 Comments »
GotW #100: Solution
Posted in C++, GotW on 2011-11-16 | 8 Comments »
The solution to GotW #100 is now live.
GotW #100: Compilation Firewalls
Posted in C++, GotW on 2011-11-04 | 23 Comments »
JG Questions 1. What is the Pimpl Idiom, and why is it useful? Guru Questions 2. What is the best way to express the basic Pimpl Idiom in C++11? 3. What parts of the class should go into the impl object? Some potential options include: put all private data (but not functions) into impl; put [...]