Re: Objective-C++, class scope constants, name conflicts
Re: Objective-C++, class scope constants, name conflicts
- Subject: Re: Objective-C++, class scope constants, name conflicts
- From: Scott Ribe <email@hidden>
- Date: Thu, 09 Feb 2006 16:38:36 -0700
- Thread-topic: Objective-C++, class scope constants, name conflicts
> I suppose I could be accused of being retarded for only just now thinking to
> try:
>
> @interface Foo
> enum { kControlSetCnt = 6 };
> @end
>
> That works.
Aargh!!! It compiles, but the constant does *not* have class scope, thus
having that definition in multiple classes creates name conflicts. Now
*that* is annoying me. If you can declare something inside a class
interface, then it dang well out to have class scope, not global scope!
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden