The Old New Thing

Hidden constraints on the result type in Concurrency Runtime tasks

If you are using the Concurrency Runtime task<T> to represent asynchronous activity, there are some hidden constraints on the type T. If you violate these constraints, the compiler will complain, but perhaps not in an obvious way.¹ If you try to create a task<T> where T does not have a public default constructor, then you get an...