Intermediate C++
Q79 / 100

What is the Pimpl (Pointer to Implementation) idiom?

Correct! Well done.

Incorrect.

The correct answer is B) Hiding class implementation details behind an opaque pointer, reducing compile-time dependencies and improving ABI stability

B

Correct Answer

Hiding class implementation details behind an opaque pointer, reducing compile-time dependencies and improving ABI stability

Explanation

class Widget { struct Impl; unique_ptr<Impl> pImpl; }; moves implementation to a .cpp file. Changes to Impl don't recompile Widget's clients.

Progress
79/100