[Issue 9528] std.array.appender can't append elements with const members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 8 11:35:00 PST 2013


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


monarchdodra at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra at gmail.com


--- Comment #2 from monarchdodra at gmail.com 2013-03-08 11:34:58 PST ---
The problem is that appender is making the double assuption that unqual implies
assignability, and that copyiable implies assignability (empace ony requires
copyability). Finally, it makes the wrong assumption that you can call opAssign
on something that is not yet initialized (append makes raw allocations).
Amongst a few other bugs mind you.

There is a lot of broken in appender that I've tried to fix before, but it is
very tricky because:
1) It is a ritical function that is used for strings, and needs to support
CTFE.
2) Anything that fixes emplace must not slow it down.
3) It should be calling emplace instead of opAssign but emplace is currently
broken for exactly the same reasons!

I should maybe try to fix it in smaller incremental steps, but it is very hard
to knowingly deliver code that you know is broken, and know how to fix.

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