store template value

maarten van damme via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 1 09:41:45 PDT 2015


I was afraid I would have to do that. Templatizing the class on the value
doesn't work as I later on want to create a hashmap of these classes.
When I assign a task to a variant, how do I call .yieldForce later on?

2015-08-01 18:28 GMT+02:00 Adam D. Ruppe via Digitalmars-d-learn <
digitalmars-d-learn at puremagic.com>:

> On Saturday, 1 August 2015 at 15:37:46 UTC, maarten van damme wrote:
>
>> I have a class that creates a task in it's constructor. How do I store
>> this created task as one of it's value members and later on call
>> .yieldForce()?
>>
>
> If the class itself isn't templated on the type, you'll want to use
> something like std.variant.Variant to store it.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150801/075552b6/attachment.html>


More information about the Digitalmars-d-learn mailing list