> Changing the constructor as you suggest gives exactly the same error.
> And I get that error without the virtuals in the class declaration.
[quoted text clipped - 15 lines]
> I'm stumped. It looks like C++ 2005 just can't handle multiple
> inheritance. Any base class is going to have a constructor.
> Comeau online compiler
Actually, that helped. Thank you.
Here's what the problem is:
template<class T>
class CDispatch : virtual public IDispatch, virtual public CUnknown,
private CDispatchBase
{
...
CDispatch::CDispatch(IUnknown *pOuterUnknown)
: CUnknown::CUnknown(pOuterUnknown),
m_pITypeInfo(0)
{}
CDispatch::~CDispatch()
{
if (m_pITypeInfo != NULL)
{
m_pITypeInfo->Release();
}
}
...
};
The Comeau compiler tells me:
"ComeauTest.c", line 379: error: qualified name is not allowed in member
declaration
CDispatch::CDispatch(IUnknown *pOuterUnknown)
Remove the "CDispatch::" from these two methods and everything works.
I guess this is a restriction in the new C++ standard. Can anyone
confirm this?
I think this is a compiler bug, because of the horribly off target
message. Can anyone tell me how to file a bug report?
Thanks,
++PLS
Ben Voigt - 12 Jan 2007 17:09 GMT
>> Comeau online compiler
>>
[quoted text clipped - 28 lines]
> declaration
> CDispatch::CDispatch(IUnknown *pOuterUnknown)
Oh, your functions are defined inside the class declaration block,
definitely you shouldn't double up the class name.
> Remove the "CDispatch::" from these two methods and everything works.
>
> I guess this is a restriction in the new C++ standard. Can anyone
> confirm this?
I think you were instructing the compiler to look for a nested class.
> I think this is a compiler bug, because of the horribly off target
> message. Can anyone tell me how to file a bug report?
https://connect.microsoft.com/feedback/default.aspx?SiteID=210
> Thanks,
> ++PLS