Re: Perplexed about "call of overloaded 'xxx' is ambiguous"
Re: Perplexed about "call of overloaded 'xxx' is ambiguous"
- Subject: Re: Perplexed about "call of overloaded 'xxx' is ambiguous"
- From: email@hidden
- Date: Fri, 5 Sep 2008 09:33:22 +0200
On 4 Sep 2008, at 22:03, Tommy Nordgren wrote:
On Sep 4, 2008, at 6:07 PM, Matt Gough wrote:
error: call of overloaded 'CUIString(MyNamespace::CUIString)' is
ambiguous
note: candidates are: MyNamespace::CUIString::CUIString(const
char*) <near match>
note: MyNamespace::CUIString::CUIString(const
unsigned char*, bool)
note: MyNamespace::CUIString::CUIString(const
__CFString*, bool)
note: MyNamespace::CUIString::CUIString(const
std::string&, bool)
note: MyNamespace::CUIString::CUIString(const
std::wstring&, bool)
note: MyNamespace::CUIString::CUIString(const
AppleCore::CUIString&)
*/
The class name CUIString is defined in more than one namespace.
For some reason, the constuctor gets declared as
MyNamespace::CUIString::CUIString(const AppleCore::CUIString&)
instead of as a copy constructor.
To fix, elaborate the Constructor declaration like this:
CUIString( const MyNamespace::CUIString &)
Unfortunately that was a bit of a red herring, when I created the
email, I did a find and replace of the real namespace 'AppleCore' to
'MyNamespace'. I must have missed that last one.
Matt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden