I am using pimpl idiom in my program and I am stuck in one place. My code is
Class*
Class::GetP()
{
return ClassImpl->GetP();
}
In my ClassImpl->GetP() I have
ClassImpl*
ClassImpl::GetP()
{
return pClassImpl;
}
As you can see I need to convert my pImpl bact to my caller type. What is the way?
I dont want to use any casting
Please advice