Re: isRandomAccessRange on static array

2012-04-09 Thread Brad Anderson
On Monday, 9 April 2012 at 23:22:57 UTC, Jonathan M Davis wrote: On Tuesday, April 10, 2012 00:20:20 Brad Anderson wrote: A user in IRC was having difficulty using std.algorithm.sort on a static array. It appears to be due to static arrays don't pass the isRandomAccessRange constraint. static

Re: isRandomAccessRange on static array

2012-04-09 Thread Jonathan M Davis
On Tuesday, April 10, 2012 00:20:20 Brad Anderson wrote: > A user in IRC was having difficulty using std.algorithm.sort on a > static array. It appears to be due to static arrays don't pass > the isRandomAccessRange constraint. > > static assert(isRandomAccessRange!(uint[5])); > > Results in: >

Re: isRandomAccessRange on static array

2012-04-09 Thread Ali Çehreli
On 04/09/2012 03:20 PM, Brad Anderson wrote: A user in IRC was having difficulty using std.algorithm.sort on a static array. It appears to be due to static arrays don't pass the isRandomAccessRange constraint. static assert(isRandomAccessRange!(uint[5])); Results in: Error: static assert (isRa

isRandomAccessRange on static array

2012-04-09 Thread Brad Anderson
A user in IRC was having difficulty using std.algorithm.sort on a static array. It appears to be due to static arrays don't pass the isRandomAccessRange constraint. static assert(isRandomAccessRange!(uint[5])); Results in: Error: static assert (isRandomAccessRange!(uint[5u])) is fa