Passing string literals to C
Meta via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Dec 31 06:58:55 PST 2014
On Wednesday, 31 December 2014 at 12:25:45 UTC, John Colvin wrote:
> String literals can implicitly convert to const(char)* or
> immutable(char)*. Neat. It doesn't appear to apply to array
> literals in general though...
I believe this is a special case specifically for strings added
for convenience when interfacing with C. Walter has said that he
is strongly against arrays decaying to points a la C, and D
generally does not support it save for this special case.
More information about the Digitalmars-d-learn
mailing list