Given that the following snippet does not compile:
std::stringstream ss; ss << std::wstring(L"abc");
I also did not think it would be:
std::stringstream ss; ss << L"abc";
But this happens (at least in VC ++). I assume this is due to the following ostream::operator<< overload:
ostream& operator<< (const void* val );
Does this have the potential to quietly break my code if I inadvertently mix character types?
source share