Use instancetype as insertInManagedObjectContext: return type when possible #171

Closed
nikolaykasyanov opened this Issue Aug 20, 2013 · 2 comments

Projects

None yet

3 participants

This can be solved by editing template and replacing id with instancetype, but it would limit compatibility with older compilers (as far as I get it's important for this project, so...). Dance like this should work though:

#if __has_feature(instancetype)
instancetype
#else
id
#endif insertInManagedObjectContext...

But it's too verbose. Ideas?

Owner
rentzsch commented Oct 2, 2013

I like your idea, and may even just put instancetype in the default template, sans compiler feature detection. Seems to me if you want to/have to use an older compiler, you can just #define instancetype id in your PCH.

Collaborator
justin commented Dec 26, 2015

instancetype should be the default as of now. Closing this out.

@justin justin closed this Dec 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment