"Manu via Digitalmars-d" <[email protected]> wrote in message news:[email protected]...

The other case I am running in to is when I have 'struct S(T)' or 'class C(T)', where T > can be inferred from the constructor, but it isn't.

struct S(T)
{
  this(T t)
  {
    m = t;
  }

  T m;
}

Infer this:

struct S(T)
{
   static if (is(T == int))
       this(float x) {}
   static if (is(T == float))
       this(int x) {}
}

Reply via email to