Skip to content

Instantly share code, notes, and snippets.

@dmaclach
Last active November 29, 2018 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmaclach/a55a534cc54e6252827268b2c79b880f to your computer and use it in GitHub Desktop.
Save dmaclach/a55a534cc54e6252827268b2c79b880f to your computer and use it in GitHub Desktop.
ObjectiveC wrapping C++
#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