In general, accessing p directly is in contradiction to the pimpl design pattern. Anything within PImpl which you need to access externally should be passed through a method in MyClass.