Exactly.
I suppose I should write out how the
throw example can now be written:
throw new std::runtime_error("A std::string constant explaining the problem with "s + someStrOfInterest);
As for your example, it could be written:
void somefunc()
{
std::cout << "Whatever"s + ", whatever 2" << std::endl;
}
Though really, when you have two string literals in a row, you'd probably just combine them.
Another pain about C++, is prefixing everything with
std::. I'm now kind of used to it in most contexts, but I still find it a bit overly verbose and tedious for quick debug output in test programs. In particular, I often forget the
std:: prefix on the
endl.