task can't take a class method

John Chapman johnch_atms at hotmail.com
Mon Nov 19 17:18:14 UTC 2018


On Monday, 19 November 2018 at 16:29:01 UTC, helxi wrote:
> On Monday, 19 November 2018 at 16:10:15 UTC, helxi wrote:
>> ...
>
> Oh wait never mind I was missing a bracket:
>
>             auto proc = task!(ddCall.dd());
>
> Now I have another thing to worry about: ddcall.dd() cannot be 
> read at compile time.

You're attempting to execute "dd" at compile time. You should be 
able to pass the function to a task in a couple of ways:

1) task(&ddCall.dd)
2) task!(ddCall.dd)



More information about the Digitalmars-d-learn mailing list