Why const for implicit conversion?
问题 After extensive reading of ISO/IEC 14882, Programming language – C++ I'm still unsure why const is needed for implicit conversion to a user-defined type with a single argument constructor like the following #include <iostream> class X { public: X( int value ) { printf("constructor initialized with %i",value); } } void implicit_conversion_func( const X& value ) { //produces "constructor initialized with 99" } int main (int argc, char * const argv[]) { implicit_conversion_func(99); } Starting