Re: why does phobos use [0, 5, 8, 9][] instead of [0, 5, 8, 9] in examples?

2015-04-07 Thread Vladimir Panteleev via Digitalmars-d-learn
On Wednesday, 8 April 2015 at 02:40:14 UTC, Timothee Cour wrote: Eg, code like this in std.algorithm: assert(equal(setSymmetricDifference(a, b), [0, 5, 8, 9][])); why not just: assert(equal(setSymmetricDifference(a, b), [0, 5, 8, 9])); ? It's historic. DMD 2.041 changed the type of array

why does phobos use [0, 5, 8, 9][] instead of [0, 5, 8, 9] in examples?

2015-04-07 Thread Timothee Cour via Digitalmars-d-learn
Eg, code like this in std.algorithm: assert(equal(setSymmetricDifference(a, b), [0, 5, 8, 9][])); why not just: assert(equal(setSymmetricDifference(a, b), [0, 5, 8, 9])); ?

Re: why does phobos use [0, 5, 8, 9][] instead of [0, 5, 8, 9] in examples?

2015-04-07 Thread Ali Çehreli via Digitalmars-d-learn
On 04/07/2015 07:40 PM, Timothee Cour via Digitalmars-d-learn wrote: Eg, code like this in std.algorithm: assert(equal(setSymmetricDifference(a, b), [0, 5, 8, 9][])); why not just: assert(equal(setSymmetricDifference(a, b), [0, 5, 8, 9])); ? It must be a leftover from the time when the type