@property - take it behind the woodshed and shoot it?
Walter Bright
newshound2 at digitalmars.com
Thu Jan 24 12:28:14 PST 2013
On 1/24/2013 12:23 PM, Walter Bright wrote:
> On 1/24/2013 5:41 AM, deadalnix wrote:
>> For regular functions :
>> 1. funName is the function itself :
>> void funName() {}
>> static assert(is(typeof(funName) == void function())); // Pass.
>> funName has no address, it is equivalent to enum function void() funName = {};
>> &funName become a NOOP and is deprecated, for compatibility reasons. It is
>> not ambiguous as funName has no address anyway.
>
> Dang, I hadn't thought of the typeof(funName) issue.
>
On further thought, if funName is a property, then typeof(funName) should give
the return type of the property, not the 'function' type.
More information about the Digitalmars-d
mailing list