Summary: | Overload String::operator[] for integer types other than unsigned | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Mentovai <mark> | ||||
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED INVALID | ||||||
Severity: | Trivial | CC: | ap, darin, mjs | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Mark Mentovai
2008-03-12 14:33:37 PDT
Created attachment 19714 [details]
Use 0U instead of 0
Ick. I hope there is some other way to avoid this error. Comment on attachment 19714 [details]
Use 0U instead of 0
This should only be an issue in Objective-C++ files. The ambiguity comes from the operator NSString*() overload.
Why are you seeing this ambiguity in a .cpp file? Are you trying to compile this file as ObjC++?
Comment on attachment 19714 [details]
Use 0U instead of 0
I'm going to mark this as review-.
The real problem is that this file is being compiled with __OBJC__ defined -- you need to figure out why.
Aside from the specific issues in this .cpp file, we can eliminate this ambiguity in ObjC++ files by overloading the String [] operator for integer types other than unsigned. But once we overload for any type other than unsigned, we'll need overloads for all the integer types we want to allow. Doing that overload would be nice for ObjC++ files -- should not be relevant for this file, though. Good catch, this file somehow got flipped to sourcecode.cpp.objcpp in my project. I've got a few other filetype things that I've verified do exist in the trunk WebCore.xcodeproj, I'll file separately for those, leaving this bug to be repurposed per comment 5 if desired. I found other uses of 0U to disambiguate between the two choices for operator[] in platform/graphics/mac/IconMac.mm and platform/mac/KeyEvent.mm. |