On Friday, 25 January 2019 at 09:36:24 UTC, rikki cattermole wrote:
On 25/01/2019 10:34 PM, AndreasDavour wrote:
How am I supposed to use that??

   auto point3 = getResponse!Point!int("What's the point? ");

auto point3 = getResponse!(Point!int)("What's the point? ");

   auto point4 = getResponse!Point!int("What's the point? ");
   writeln("Distance: ", point3.distanceTo(point4));

generates the error:

struct_templates.d(48): Error: multiple ! arguments are not allowed struct_templates.d(49): Error: multiple ! arguments are not allowed

Which makes me wonder about the syntax.

I thought about that option, if it was unclear to the parser that Point!int was the type to instantiate upon. Changing to the other syntax made me wonder what would happen when getResponse is calling itself, which in self was something I am a bit unsure of how to understand. Because we get the same syntax issue there and it does not seem to work.

Reply via email to