I was looking through the NSString header file to see how Apple writes their enumerations and came across this piece of code:
enum {
    NSStringEncodingConversionAllowLossy = 1,
    NSStringEncodingConversionExternalRepresentation = 2
};
typedef NSUInteger NSStringEncodingConversionOptions;
This leaves me with a couple questions.
- Why have they used anonymous enumerations? Is this method advantageous?
- Is the typedef NSUInteger NSStringEncodingConversionOptions;line a good idea to include normally, or is it only used here because they have declared an anonymous enumeration?
 
     
    