[Issue 5251] Const C file
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 22 10:17:33 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5251
--- Comment #4 from bearophile_hugs at eml.cc 2010-11-22 10:16:12 PST ---
(In reply to comment #3)
> 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.
I understand, you are right, thank you.
--
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