On 19/06/2012, at 6:42 AM, James Dennett wrote:
> On Sun, Jun 17, 2012 at 4:02 PM, john skaller
> wrote:
>> The failure of the strdict-01 regression test on Windows has
>> again highlighted the design fault in strings .. both Felix and C++.
>>
>> When you call
>>
>>char const *p = stri
On Sun, Jun 17, 2012 at 4:02 PM, john skaller
wrote:
> The failure of the strdict-01 regression test on Windows has
> again highlighted the design fault in strings .. both Felix and C++.
>
> When you call
>
> char const *p = string("hello").c_str();
>
> in C++ you have a dangling pointer p.
The failure of the strdict-01 regression test on Windows has
again highlighted the design fault in strings .. both Felix and C++.
When you call
char const *p = string("hello").c_str();
in C++ you have a dangling pointer p. The call succeeds because
string("hello") is a non-const rvalue,