struct Parameterized(T, U, V, W)
{
   T t;
   U u;
   V v;
   W w;
   this(T t, U u, V v, W w)
   {
      this.t = t;
          this.u = u;
          this.v = v;
          this.w = w;
   }
}

Parameterized!(int, double, bool, char) p1; // compiles
// or
auto p2 = Parameterized!(int, double, bool, char)(); // must have the empty () to compile
// or
auto p3 = Parameterized!(int, double, bool, char)(57, 7.303, false, 'Z'); // compiles
// but not
// Parameterized!(int, double, bool, char)(93, 5.694, true, 'K') p4;
// Error: found 'p4' when expecting ';' following statement
// nor
// Parameterized!(int, double, bool, char) p5(93, 5.694, true, 'K');
// Error: found 'p5' when expecting ';' following statement
// nor, OK this was a crazy try
// Parameterized!(int 93, double 5.694, bool true, char 'K')  p6;
// Error: found '93' when expecting '.' following int

Reply via email to