Could this be made to work? struct S(T) { T x; this(T x) { this.x = x; } } void main() { int x = 42; auto s = S(x); // fails to deduce T }