Problem with templates
BCS
ao at pathlink.com
Mon Jul 7 10:33:22 PDT 2008
Reply to Sean,
>> Of course it works, plus is a delegate :)
>>
>> Now put "static" in front of the declaration of plus and watch it
>> fail.
>>
> Ohhhhh.. I thought you had to use the delegate keyword to make
> something a delegate, or otherwise it was a function by default. Guess
> I need to read the docs more carefully.
>
Short test for delegate vs. fn ptr: If you can reference any non-static,
non-global, non-local values, it will be a delegate.
More information about the Digitalmars-d-learn
mailing list