error C2385 ambiguity

Hi,

I’m getting

c:\panda3d-1.5.2\include\eventparameter.i(66) : error C2385: 'EventStoreTypedRefCount::new' is ambiguous
c:\panda3d-1.5.2\include\eventparameter.i(66) : warning C4385: could be the 'new' in base 'MemoryBase' of base 'TypedObject' of base 'TypedWritable' of base 'TypedWritableReferenceCount' of base 'EventStoreValueBase' of class 'EventStoreTypedRefCoun
t'
c:\panda3d-1.5.2\include\eventparameter.i(66) : warning C4385: or the 'new' in base 'MemoryBase' of base 'ReferenceCount' of base 'TypedWritableReferenceCount' of base 'EventStoreValueBase' of class 'EventStoreTypedRefCount'

and

c:\panda3d-1.5.2\include\eventparameter.i(66) : error C2385: 'EventStoreTypedRefCount::delete' is ambiguous
c:\panda3d-1.5.2\include\eventparameter.i(66) : warning C4385: could be the 'delete' in base 'MemoryBase' of base 'TypedObject' of base 'TypedWritable' of base 'TypedWritableReferenceCount' of base 'EventStoreValueBase' of class 'EventStoreTypedRefC
ount'
c:\panda3d-1.5.2\include\eventparameter.i(66) : warning C4385: or the 'delete' in base 'MemoryBase' of base 'ReferenceCount' of base 'TypedWritableReferenceCount' of base 'EventStoreValueBase' of class 'EventStoreTypedRefCount'

on several files (not just eventparameter.i). Can someone let me know which new and delete is the correct one? I’ve done a search and couldn’t find anything on this problem so I apologize if the subject’s been addressed before.

Also, I’d rather not make a cast to fix this so if there’s something else that will resolve this I’d be grateful.

Thanks,

  • Sudz

Either one is correct. The class in question is inheriting from MemoryBase along two different pathways. Both pathways resolve to the same method, so it doesn’t matter which one it chooses.

I wasn’t aware of the ambiguity before; our compilers aren’t complaining about it. I’ll put in a disambiguation.

Still, it’s just a warning, right? There should be no need for you to put an explicit cast in to resolve the issue if your only purpose is to compile Panda.

David

Actually, it is being reported as an error. However, my compiler is the venerable and, admittedly, ancient, Visual Studio 6.0 Even though the documentation recomments VS 2005 and above I thought I’d give it a shot and see what happens.

The ambiguity lies in several of the files so I wouldn’t go too far out of the way to resolve this just for an older compiler :slight_smile:

Thanks for your replay

It’s been a very long time since we compiled with VS 6.0. I suspect there are lots of things in there that no longer work with that compiler.

David