Re: strange looking ambiguity with type cast
Re: strange looking ambiguity with type cast
- Subject: Re: strange looking ambiguity with type cast
- From: jean-françois gauthier <email@hidden>
- Date: Wed, 11 Feb 2004 17:13:19 -0500
a couple of points about this.
i dont think that the conversion method returns a reference; if it
did, then calling _b. operator a () would fail to compile as well.
moreover, commenting out the declaration for the other conversion
operator (operator int ()), the code compiles fine. so im starting to
think that its a bug in gcc. the reason im worrying about this at all
is that id rather not modify loads of code just for xcode-gcc if im
not sure why im doing it.
jean-frangois
Le 11 fivr. 2004, ` 16:35, GoochRules! a icrit :
I think what you're missing is that there's a unnamed temporary of
type a created during (a) _b, because operator a() returns an a& by
definition.
So, gcc isn't confusing a::a(b) with b::operator a(), it simply need
to know whether to call b::operator a() or b::operator int() to pass
to the appropriate constructor for a.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.