• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trouble with imported enums in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with imported enums in Swift


  • Subject: Re: Trouble with imported enums in Swift
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 21 Oct 2014 21:54:32 +0000

On Oct 21, 2014, at 14:35 , Rick Mann <email@hidden> wrote:
>
>> On Oct 21, 2014, at 14:26 , Quincey Morris <email@hidden> wrote:
>>
>> Honestly, though, I don’t see why you can’t just deal with writing enums the “compatible” way.
>
> Because the file whence it comes is part of a library of C++ code that also has to run on Linux.

Swift isn’t a C++ cross-compiler either.

You know that the NS_ENUM thing is a macro, don’t you?  (Or, at least, can be — it seems to be a syntax feature in the latest clang.) Five seconds searching the web gave me this:

> #ifndef NS_ENUM
> #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
> #endif

of which I assume a slight variant will eliminate the clang-specific syntax and therefore work fine in C++ and on Linux.




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Trouble with imported enums in Swift
      • From: Rick Mann <email@hidden>
References: 
 >Trouble with imported enums in Swift (From: Rick Mann <email@hidden>)
 >Re: Trouble with imported enums in Swift (From: Roland King <email@hidden>)
 >Re: Trouble with imported enums in Swift (From: Rick Mann <email@hidden>)
 >Re: Trouble with imported enums in Swift (From: Roland King <email@hidden>)
 >Re: Trouble with imported enums in Swift (From: Rick Mann <email@hidden>)
 >Re: Trouble with imported enums in Swift (From: "Raglan T. Tiger" <email@hidden>)
 >Re: Trouble with imported enums in Swift (From: Rick Mann <email@hidden>)
 >Re: Trouble with imported enums in Swift (From: Greg Parker <email@hidden>)
 >Re: Trouble with imported enums in Swift (From: Rick Mann <email@hidden>)
 >Re: Trouble with imported enums in Swift (From: Quincey Morris <email@hidden>)
 >Re: Trouble with imported enums in Swift (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Trouble with imported enums in Swift
  • Next by Date: Re: Trouble with imported enums in Swift
  • Previous by thread: Re: Trouble with imported enums in Swift
  • Next by thread: Re: Trouble with imported enums in Swift
  • Index(es):
    • Date
    • Thread