[odb-users] MSVC Compiler Error C2872 when comipling a project using ODB with a polymorphic heirarchy

Boris Kolpackov boris at codesynthesis.com
Wed Jun 12 04:46:56 EDT 2013


Hi Jordan,

Jordan J. Neuhart <jneuhart at tlirr.com> writes:

> C:\Users\jjn\Documents\SourceCode\NewSalesDesign\sales_and_design\odb\li
> bodb\odb\polymorphic-info.hxx:63: error: C2872: 'database' : ambiguous
> symbol
> 
> could be
> 'C:\Users\jjn\Documents\SourceCode\NewSalesDesign\sales_and_design\odb\l
> ibodb\odb\database.hxx:37: odb::database'
> 
> or
> 'C:\Users\jjn\Documents\SourceCode\NewSalesDesign\sales_and_design\odb\l
> ibodb-sqlite\odb\sqlite\database.hxx:36: odb::sqlite::database'

This is a fairly annoying bug in VC++ where it complains about a bogus
ambiguity. The really nasty part is that it is situation dependent,
which is why we didn't pick this up with our tests.

Anyway, I've qualified the affected names which should work around
the problem. Can you give the bug fix a try and let me know if
there are still any problems?

http://www.codesynthesis.com/~boris/tmp/odb/libodb-2.2.3.zip

Boris



More information about the odb-users mailing list