This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Puzzled by const string& parameter
- From: "Neo Anderson" <neo_in_matrix at msn dot com>
- To: eljay at adobe dot com, gcc-help at gcc dot gnu dot org
- Date: Fri, 24 Jun 2005 06:02:03 -1000
- Subject: Re: Puzzled by const string& parameter
- Bcc:
>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?