Unwanted conflict
Carl Sturtivant
sturtivant at gmail.com
Sat Jul 20 15:10:40 PDT 2013
struct A {
string s;
int n;
this( string s) { this.s = s; }
this( int k)( int n) { this.n = n - k; }
}
compiled with dmd gives an error message as follows.
constr_conflict.d(5): Error: template
constr_conflict.A.__ctor(int k)(int n) conflicts with constructor
constr_conflict.A.this at constr_conflict.d(4)
The exact details seem unimportant except that one constructor
has compile-time parameters and the other does not.
What is the conflict exactly?
More information about the Digitalmars-d-learn
mailing list