Re: [Felix-language] string problem

2012-06-18 Thread john skaller
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

Re: [Felix-language] string problem

2012-06-18 Thread James Dennett
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.

[Felix-language] string problem

2012-06-17 Thread john skaller
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,