www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19257] New: std.array.join does not handle const fields that


          Issue ID: 19257
           Summary: std.array.join does not handle const fields that
                    cannot be converted to mutable
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: default_357-line yahoo.de

std.array.join tries to remove constness from its arrays' fields on the premise
that it's constructing a new array anyways. However, consider
const(Object)[][].join: const(Object) cannot be implicitly converted to Object,
so the join fails.

In that case, join should just return a const(Object)[] array.

Sep 21 2018