Visual Studio 2013 'explicit' keyword bug?
问题 Consider the following program: #include <iostream> class A { public: A( ) { std::cout << "A()\n"; } A( A& ) = delete; A( int i ) { std::cout << "A( " << i << " )\n"; } explicit operator int( ) { std::cout << "operator int()\n"; return 42; } }; template< typename T = A > void f( T a = A() ) {} int main( void ) { f(); return 0; } Visual Studio 2013 compiles this code and runs, with output A() operator int() A( 42 ) Is this a compiler bug? It looks like the VS compiler doesn't heed the