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@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. >