[Issue 5251] Const C file
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 22 10:13:16 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5251
--- Comment #3 from Steven Schveighoffer <schveiguy at yahoo.com> 2010-11-22 10:11:55 PST ---
const is transitive, so if you imagine a FILE having this structure:
struct FILE
{
int fd;
ubyte[] buffer;
}
Now, if FILE is const, then buffer is const(ubyte[]), so how does fprintf write
to that buffer?
What you are looking for is head-const (the variable cannot change, but
everything it points to can), which has some good uses, but does not exist in
D.
--
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