Re: ARC and reinterpret_cast

2012-07-18 Thread Rick Mann
On Jul 18, 2012, at 1:22 , Jean-Daniel Dupas wrote: > Just a though, but isn't it possible to define yourself a template function > to do that ? > > something like > > template > static inline C bridge_cast(void *ptr) { return (__bridge C)ptr; } Hey, that's kinda cool! I think that might w

Re: ARC and reinterpret_cast

2012-07-18 Thread Jean-Daniel Dupas
Le 18 juil. 2012 à 08:28, Rick Mann a écrit : > > On Jul 9, 2012, at 16:00 , John McCall wrote: > > From: Rick Mann > Subject: ARC and reinterpret_cast? > Date: July 7, 2012 9:13:29 PM PDT > To: Cocoa-Dev List > > Hi. I'd like to write code like this: > >

Re: ARC and reinterpret_cast

2012-07-18 Thread Rick Mann
On Jul 9, 2012, at 16:00 , John McCall wrote: From: Rick Mann Subject: ARC and reinterpret_cast? Date: July 7, 2012 9:13:29 PM PDT To: Cocoa-Dev List Hi. I'd like to write code like this: MyObject* foo = reinterpret_cast<__bridge MyObject*> (someVoid

Re: ARC and reinterpret_cast

2012-07-17 Thread John McCall
>>> From: Rick Mann >>> Subject: ARC and reinterpret_cast? >>> Date: July 7, 2012 9:13:29 PM PDT >>> To: Cocoa-Dev List >>> >>> Hi. I'd like to write code like this: >>> >>> MyObject* foo = reinterpret_cast<__bridge MyObject*> (someVoidPointer); >>> >>> But the compiler doesn't like it. It

Re: ARC and reinterpret_cast?

2012-07-09 Thread Andreas Grosam
On 08.07.2012, at 06:13, Rick Mann wrote: > 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; >