[Issue 4251] Hole in the const system: immutable values can be overwritten (const(T) is appendable to const(T)[])

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 16 01:27:03 PDT 2011


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


Stewart Gordon <smjg at iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg at iname.com


--- Comment #5 from Stewart Gordon <smjg at iname.com> 2011-06-16 01:22:22 PDT ---
(In reply to comment #3)
>> T*** => const(T***)   allowed, full const
>> T*** => const(T**)*   allowed, tail const
>> T*** => const(T*)**   not allowed
>> T*** => const(T)***   not allowed
>> T*** => T***          allowed, same number of mutable indirections
>> immutable(T*)** => const(T*)** allowed, same number of mutable indirections
>etc

I agree about the first five of these.  But I'm not sure if this last one is
safe.  I'll think about it when I've more time.  In any case, see this set of
rules I proposed before:

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=81566

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