5820 – Documentation states string literals can implicitly convert to char*

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5820 - Documentation states string literals can implicitly convert to char*
Summary: Documentation states string literals can implicitly convert to char*
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: Other Windows
: P2 trivial
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
Reported: 2011年04月08日 10:30 UTC by simendsjo
Modified: 2012年01月20日 20:43 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description simendsjo 2011年04月08日 10:30:54 UTC
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
Comment 1 github-bugzilla 2012年01月20日 20:41:14 UTC
Commit pushed to https://github.com/D-Programming-Language/d-programming-language.org
https://github.com/D-Programming-Language/d-programming-language.org/commit/f7c94aa84c0e16a079f80861ad63b1dd8d63f9e4
fix Issue 5820 - Documentation states string literals can implicitly convert to char*


AltStyle によって変換されたページ (->オリジナル) /