[Issue 5820] New: Documentation states string literals can implicitly convert to char*

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 8 10:34:34 PDT 2011


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

           Summary: Documentation states string literals can implicitly
                    convert to char*
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: websites
        AssignedTo: nobody at puremagic.com
        ReportedBy: simen.endsjo at pandavre.com


--- Comment #0 from simendsjo <simen.endsjo at pandavre.com> 2011-04-08 10:30:54 PDT ---
http://digitalmars.com/d/2.0/arrays.html says
(...), and a string literal can be implicitly cast to a char*

char* a = "a"; // cannot implicitly convert expression "a" of type string to
char*
char* b = cast(char*)"a"; // ok
const(char)* c = "a"; // ok

-- 
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