Top "Pimpl-idiom" questions

The PIMPL idiom, also known as the compilation firewall or Cheshire Cat technique, is a "private implementation" technique useful in C++ and other similar statically compiled languages.

Why should the "PIMPL" idiom be used?

Backgrounder: The PIMPL Idiom (Pointer to IMPLementation) is a technique for implementation hiding in which a public class wraps a …

c++ oop information-hiding pimpl-idiom
Is the pImpl idiom really used in practice?

I am reading the book "Exceptional C++" by Herb Sutter, and in that book I have learned about the pImpl …

c++ oop pimpl-idiom
Pimpl idiom vs Pure virtual class interface

I was wondering what would make a programmer to choose either Pimpl idiom or pure virtual class and inheritance. I …

c++ abstract-class pimpl-idiom
The Pimpl Idiom in practice

There have been a few questions on SO about the pimpl idiom, but I'm more curious about how often it …

c++ pimpl-idiom
How do I use unique_ptr for pimpl?

Here is a simplification of what I'm seeing when I try to use unique_ptr for pimpl. I chose unique_…

c++ c++11 pimpl-idiom unique-ptr
Free function versus member function

What is the advantage of having a free function (in anonymous namespace and accessible only in a single source file) …

c++ dependencies member-functions pimpl-idiom non-member-functions
Should I use shared_ptr or unique_ptr

I've been making some objects using the pimpl idiom, but I'm not sure whether to use std::shared_ptr or …

c++ c++11 shared-ptr pimpl-idiom unique-ptr
How to use the Qt's PIMPL idiom?

PIMPL stands for Pointer to IMPLementation. The implementation stands for "implementation detail": something that the users of the class need …

c++ qt pimpl-idiom
Why is "error: invalid application of 'sizeof' to an incomplete type using unique_ptr" fixed by adding an empty destructor?

I am Pimpling off the class STFT. Compiles just fine with this in the header: class STFT; // pimpl off to …

c++ c++11 unique-ptr pimpl-idiom
pimpl for a templated class

I want to use the pimpl idiom to avoid having users of my library need our external dependencies (like boost, …

c++ idioms pimpl-idiom