Re: Question for compiler gurus about compile-time strings

2017-12-09 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, December 09, 2017 23:38:46 Stefan Koch via Digitalmars-d-learn wrote: > On Saturday, 9 December 2017 at 18:45:18 UTC, Steven > > Schveighoffer wrote: > > I was thinking that all strings generated at compile-time have > > a null-terminator added. But then I thought, wait, maybe that's

Re: Question for compiler gurus about compile-time strings

2017-12-09 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 9 December 2017 at 18:45:18 UTC, Steven Schveighoffer wrote: I was thinking that all strings generated at compile-time have a null-terminator added. But then I thought, wait, maybe that's only specifically for string literals. What is the true answer? If you generate a string, let

Question for compiler gurus about compile-time strings

2017-12-09 Thread Steven Schveighoffer via Digitalmars-d-learn
I was thinking that all strings generated at compile-time have a null-terminator added. But then I thought, wait, maybe that's only specifically for string literals. What is the true answer? If you generate a string, let's say via a CTFE call, does it have a null terminator? -Steve