struct S
{
int m;
// this(long x)
// this(T : long)( T x) const
this(T : long)( T x)
{ m = x;}
}
void main()
{
S s = 6;
const S t = 7;
}
bug.d(18): Error: template bug.S.__ctor does not match any function template declaration
bug.d(11): Error: template bug.S.__ctor(T : long) cannot deduce template function from argument types !()(int)
If the constructor signature is replaced with either of the two commented lines, it compiles.