On Feb 13, 2012, at 6:34 PM, Chris Suter wrote:
> On Tue, Feb 14, 2012 at 12:39 PM, John McCall <email@hidden> wrote:
>
>> Again, there's a bad diagnostic here, but the same problem occurs in
>> non-ARC. Template argument deduction infers T=NSString*, and then you can't
>> actually initialize an NSString*& with an NSString* r-value.
>
> OK, but there is an ARC issue. If you change the template to:
>
> template<typename T>
> static void boom(T const & arg) {
> NSLog(@"boom! yes!");
> }
>
> It works non-ARC (as it should), but not under ARC (Apple clang
> version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)).
>
> Is that a bug?
That one definitely looks like a bug. :)
As a workaround, using T as the argument type should work just fine
if you're only trying to be polymorphic over ObjC object types.
John.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden