ARC and reinterpret_cast?
ARC and reinterpret_cast?
- Subject: ARC and reinterpret_cast?
- From: Rick Mann <email@hidden>
- Date: Sat, 07 Jul 2012 21:13:29 -0700
Hi. I'd like to write code like this:
MyObject* foo = reinterpret_cast<__bridge MyObject*> (someVoidPointer);
But the compiler doesn't like it. It's perfectly happy with:
MyObject* foo = (__bridge MyObject) someVoidPointer;
this is in a .mm file.
The error is:
error: type name requires a specifier or qualifier
MyObject* me = reinterpret_cast<__bridge MyObject*> (inRefCon);
^
error: expected '>'
MyObject* me = reinterpret_cast<__bridge MyObject*> (inRefCon);
^
>
note: to match this '<'
MyObject* me = reinterpret_cast<__bridge MyObject*> (inRefCon);
^
Is it a bug in the compiler, or am I doing something wrong?
TIA,
--
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden