In Visual Studio 2013, the compiler will report error if I write:
std::string test = 3;
showing:
error C2440: 'initializing' : cannot convert from 'int' to 'std::basic_string,std::allocator>'.
However, if I change it to:
std::string test = "";
test = 3;
it just compiles! Of course will end up with tragic error.
Why this can happen?