Last active
November 29, 2018 21:59
-
-
Save dmaclach/a55a534cc54e6252827268b2c79b880f to your computer and use it in GitHub Desktop.
ObjectiveC wrapping C++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#include <map> | |
#include <string> | |
struct CppType { | |
std::map<std::string, std::string> myMap; | |
}; | |
@interface ObjCType : NSObject { | |
CppType map; | |
} | |
@end | |
@implementation ObjCType | |
@end | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
NSLog(@"%s", @encode(ObjCType)); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment