[Issue 10724] Allow slice of string literal to convert to const(char)*

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 28 03:42:54 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10724


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #2 from bearophile_hugs at eml.cc 2013-07-28 03:42:51 PDT ---
Implicit conversions introduce a bit of dangers in a language. They should be
minimized.

Instead of this:
const(char)* s = "abc"[0..$-1];

What about this?
const(char)* s = "abc"[0..$-1].ptr;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list