>Can you tell me where the DOH is?
Your example does not involve a temporary, which was the point of the
example I was trying to contrive, and mimics the situation you had
originally inquired about.
What about this:
void test(string& s)
{
s = "abc";
}
test(string("123");
If this code compiles under gcc, where is the DOH?