template statistics
Nick Treleaven
nick at geany.org
Thu Jun 4 14:02:30 UTC 2020
On Thursday, 4 June 2020 at 11:13:12 UTC, Jacob Carlborg wrote:
> On Wednesday, 3 June 2020 at 21:01:48 UTC, Steven Schveighoffer
> wrote:
>> But the question above is still unanswered -- writeln receives
>> a string as an immutable(char)[], and doesn't know that it's
>> from a literal.
>
> Perhaps add an overload that takes `const(char)*`?
That overload would be unsafe:
const c = 'c';
writeln(&c);
writeln(&"s".idup[0]);
More information about the Digitalmars-d
mailing list