------- Comment #2 from jia3ep at gmail dot com 2008-07-09 12:30 ------- Please, look at the following code. There are the same conversions, but it's compiles and works without any errors. In the following sample takes place implicit conversion 'int' to 'double' and then copy-initialization(that requires implicit conversion too). That's have to work in all cases(with type1/type2 and with int/double) in one way.
struct sss { sss( double ) { }; }; int main() { int x = 7; sss xxx = x; return 0; } And finnaly look at the sample with template class. It's may compile or not depending on what type will be selected: struct type1 { type1() {}; }; struct type2 { type2( const type1& ) {}; }; template<typename T> struct sss { sss( T ) { }; }; int main() { int i = 7; sss<double> xxx = i; // int to double works! type1 t; sss<type2> xxx2 = t; // type1 to type2 leads to compile time error! return 0; } -- jia3ep at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36769