[webkit-dev] Enum naming style?
Peter Kasting
pkasting at chromium.org
Wed Oct 1 17:16:55 PDT 2008
On Wed, Oct 1, 2008 at 5:11 PM, Paul Pedriana <ppedriana at gmail.com> wrote:
> >> One can use Color::Brown to solve ambiguities if necessary
>
> That would be invalid C++. If a given compiler accepts it then the compiler
> is not strictly conforming. See the C++ Standard section 7.2 and section 9.2
> p1. A scoping operator prefixed to an enumerand refers to the enclosing
> scope (class or namespace).
>
You're right, my bad memory. Normally I have something like:
class MyClass {
enum Color {
Brown, Red, ...
}
};
...And in this case I was thinking of what amounts to MyClass::Brown, not
Color::Brown. But my brain elided the class out and said "no, no, you can
use enum names as scopes!" Bad brain. No biscuit.
PK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20081001/6c8ebbe8/attachment.html
More information about the webkit-dev
mailing list