[Issue 5663] std.array.Appender.put bug

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 27 22:05:34 PST 2011


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



--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2011-02-27 22:02:45 PST ---
Following patch will fix this bug.

 std/array.d |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/std/array.d b/std/array.d
index c0f466c..e0c64f0 100644
--- a/std/array.d
+++ b/std/array.d
@@ -1196,7 +1196,9 @@ Appends an entire range to the managed array.
         // note, we disable this branch for appending one type of char to
         // another because we can't trust the length portion.
         static if (!(isSomeChar!T && isSomeChar!(ElementType!Range) &&
-                     !is(Range == Unqual!(T)[])) &&
+                     !is(Range == Unqual!T[]) &&
+                     !is(Range == const(T)[]) &&
+                     !is(Range == immutable(T)[])) &&
                    is(typeof(items.length) == size_t))
         {
             // optimization -- if this type is something other than a string,

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