Relative Content

Tag Archive for c++c++17pimpl-idiom

How to implement an overloaded arrow operator for a PImpl implementation

I am learning PImpl using the following MyClass. In the main function, I am using this class. I am getting a compilation error when I try to use the overloaded arrow operator function. The IntelliSense in Visual Studio suggests pointer to incomplete class type is not allowed and I have attached the screenshot of the exact compiler error. It would be great to know what exactly is the problem here and how exactly to implement an overloaded arrow operator in this case.