Reputation: 86005
What's the meaning of __typeof
keyword in Objective-C context?
Upvotes: 2
Views: 1115
Reputation: 385680
The __typeof
keyword has the same meaning as the typeof
keyword: it is used at compile-time instead of an explicit type, to mean the type of its parameter.
You will see __typeof
in system header files because the typeof
keyword is non-standard. So the typeof
keyword can be disabled by a compiler flag, or the user can #define
it to mean something else. The C language standard reserves all identifiers that start with __
for use by the compiler, so the compiler can define the __typeof
keyword even when the typeof
keyword is disabled, and the user is not supposed to #define
it to mean something else.
Upvotes: 4