Voldemort Type Construction Error
Kapps via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jan 15 22:06:03 PST 2016
On Friday, 15 January 2016 at 20:04:47 UTC, Nordlöw wrote:
> On Friday, 15 January 2016 at 16:51:24 UTC, Anon wrote:
>> On Friday, 15 January 2016 at 14:04:50 UTC, Nordlöw wrote:
>>> What have I missed?
>>
>> In line 126, `static struct Result()` is a template. Either
>> drop the parens there, or change the call on line 187 to
>> `Result!()(haystack, needles)`.
>
> Ahh, annoying mistake.
>
> Why is this allowed?
>
> /Per
At least for functions, making them templates provides some
benefits like inferring attributes. Not sure if it behaves the
same way on structs by making all functions within it templates.
More information about the Digitalmars-d-learn
mailing list