This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 3.3 operator[] disambiguation


Alexy Khrabrov wrote:
I switched from gcc 2.95.3 to 3.3 for MICO 2.3.10,
a CORBA C++ implementation, and got this most amazing
error ever:

MS_EntryFactoryImpl.C:101: error: ISO C++ says that `typename T::ElementType TSeqVar<T>::operator[](long unsigned int) [with T = StringSequenceTmpl<CORBA::String_var>]' and `operator[]' are ambiguous even though the worst conversion for the former is better than the worst conversion for the latter

The CORBA Var types precede auto_ptr with the same idea.
What's funny is there's no parameterless operator[] in their
declaration for CORBA Sequence Var template.  A CORBA
Sequence type is like a vector, and the offending line contains
a simple dereference, like seqV[i] so the mere use of it causes
a problem!  I wonder what is meant there by "and `operator[]'"?
the builtin operator[]. Do you have a conversion op from TSeqVar<T>
to a pointer?

nathan


-- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC The voices in my head said this was stupid too nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]