Hello Josef, On 02/01/2012 03:07 PM, Josef Grunig wrote: > I get this compile error when building OSGImageForeground.cpp in OSGWindow > > ==================== ERROR ======================= > C:\Program Files (x86)\Microsoft Visual Studio > 8\VC\include\xutility(1685) : error C2593: 'operator -' is ambiguous > > D:\devel\OpenSG2\Source\Base\FieldContainer\Fields\PointerFields\OSGPointerMField.h(285): > could be '__w64 int OSG::operator -(const > OSG::PointerMFieldConstIterator&,const > OSG::PointerMFieldConstIterator&)' [found using argument-dependent > lookup] > with > [ > PtrTypeT=OSG::Image *, > RefCountPolicy=OSG::UnrecordedRefCountPolicy, > NamespaceI=0 > ] > > d:\devel\opensg2\source\base\fieldcontainer\fields\pointerfields\OSGPointerMField.inl(586): > or '__w64 int OSG::operator -(const OSG::PointerMFieldConstIterator > &,const OSG::PointerMFieldConstIterator&)' [found using > argument-dependent lookup]
hmm, looks like the compiler can not figure out that the friend declaration and the definition of the operator are meant to be the same... It looks to me like we are tripping over a compiler bug here, given that everything else (newer VS, gcc, clang) compiles this without complaint. Perhaps the easiest workaround (although of the big hammer type) is to get rid of the friend declaration and make the base() member function of the iterators public. I assume you have to use the prehistoric VS 2005 for a good reason and not just out of curiosity? ;) Cheers, Carsten ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users