Mazyod
Mazyod

Reputation: 22559

Is there a way to #if Objective-C++?

I am well aware of the #if __OBJC__ macro, but I was wondering if there was an equivalent thing for ObjC++?

Upvotes: 2

Views: 326

Answers (1)

Sebastian
Sebastian

Reputation: 7710

The macro for C++ is __cplusplus, to check for both Objective-C and C++ use

#if __OBJC__ && __cplusplus

Upvotes: 7

Related Questions