SortedRange and new docs for std.container

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Sep 8 10:09:34 PDT 2010


On 9/8/10 12:06 CDT, Andrej Mitrovic wrote:
> I don't want to hijack the topic, but can I ask a question?
>
> In the Phobos docs I often see this kind of code:
>
> assert(equal(radial(a), [ 3, 4, 2, 5, 1 ][]));
>
> What is the purpose of the extra square brackets after the array
> literal? Because the code works both with and without them.

Just historical vestige. There was a time when it didn't work without 
the [].

Andrei


More information about the Digitalmars-d mailing list