Re: Puzzled by const string& parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>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?



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux