Attribute inference for auto functions?
Walter Bright
newshound2 at digitalmars.com
Fri Apr 19 23:24:35 PDT 2013
On 4/19/2013 11:08 PM, deadalnix wrote:
> On Saturday, 20 April 2013 at 00:03:36 UTC, Walter Bright wrote:
>> A function foo:
>>
>> extern(C) int function()pure foo() { return null; }
>>
>
> That is not it as foo is extern(C).
That is correct. I was thinking about the pure. The extern(C) can be done in a
two step process, as Timon showed.
> In general we lack a mechanism to choose what an attribute bind to.
No, we don't. The attribute binds to the declaration.
BTW, in C++ also you gotta do the extern "C" as a two step process to attach it
to a function type.
More information about the Digitalmars-d
mailing list