On Mar 7, 2012, at 6:55 PM, John McCall wrote:

> On Mar 7, 2012, at 6:39 PM, Douglas Gregor wrote:
>> On Mar 7, 2012, at 6:33 PM, John McCall wrote:
>>> On Feb 22, 2012, at 9:32 AM, Douglas Gregor wrote:
>>>> Author: dgregor
>>>> Date: Wed Feb 22 11:32:19 2012
>>>> New Revision: 151170
>>>> 
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=151170&view=rev
>>>> Log:
>>>> Teach overload resolution to prefer user-defined conversion via a
>>>> lambda closure type's function pointer conversion over user-defined
>>>> conversion via a lambda closure type's block pointer conversion,
>>>> always. This is a preference for more-standard code (since blocks
>>>> are an extension)  and a nod to efficiency, since function pointers
>>>> don't require any memory management. Fixes PR12063.
>>> 
>>> Why does this have anything to do with Objective-C?
>>> Blocks are a C extension.
>> 
>> The memory-management model for the conversion to block pointer is 
>> retain+autorelease. Since we don't have an 'autorelease' equivalent in 
>> C-with-blocks, we opted to omit the block pointer conversion rather than 
>> invent another memory-management scheme.
>> 
>> Yes, we could probably come up with another solution, but IMO the user base 
>> for C++11-with-blocks-and-lambdas that isn't Objective-C++11 is too small to 
>> bother inventing something now.
> 
> Mmm, alright.  Is this documented somewhere?

r152446

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to