C to D conversion for function

Timon Gehr timon.gehr at gmx.ch
Mon Apr 29 05:59:23 PDT 2013


On 04/29/2013 02:24 PM, Sumit Raja wrote:
> On Monday, 29 April 2013 at 11:50:21 UTC, Timon Gehr wrote:
>
>> In case you want to preserve the attribute:
>>
>> struct av_printf_format{ int fmtpos, attrpos; }
>>
>> @av_printf_format(2, 3) void av_log_ask_for_sample(void* avc,
>> const(char)* msg, ...);
>
> Thanks. What does @av_printf_format(2, 3) do to the function?
>

Nothing except attaching a piece of data to it

http://dlang.org/attribute.html#UserDefinedAttribute


More information about the Digitalmars-d-learn mailing list