[Issue 13971] New: Writing a container should write its default range

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jan 12 08:26:11 PST 2015


https://issues.dlang.org/show_bug.cgi?id=13971

          Issue ID: 13971
           Summary: Writing a container should write its default range
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: nobody at puremagic.com
          Reporter: andrei at erdani.com

See the second snippet at
http://maikklein.github.io/2015/01/11/Evaluating-D-for-games/:

import std.stdio;
import std.container;
void main()
{
  Array!int arr;
  arr.insertBack(10);
  writeln(arr);
}

That writes:

Array!int(RefCounted!(Payload,
cast(RefCountedAutoInitialize)0)(RefCountedStore(20D9590)))

We should make writeln(arr) equivalent to writeln(arr[]).

--


More information about the Digitalmars-d-bugs mailing list