Consider the following program:
#include
class A
{
public:
A( ) { std::cout << \"A()\\n\"; }
A( A& ) = delete;
A( int i ) { s
This is definitely a bug in Visual C++. According to standard:
12.3.2 Conversion functions [class.conv.fct]
2 - A conversion function may be explicit (7.1.2), in which case it is only considered as a user-defined conversion for direct-initialization (8.5) in certain contexts (13.3.1.4, 13.3.1.5, 13.3.1.6).
and there is no direct-initialization in your example.
Other C++ compilers such as GCC and Clang report an error in this case.