Hi everyone,
can you explain me why this code DOES compile:
/*---*/
import std.range, std.random;
void main()
{
int[] vowels = ['A', 'E', 'I', 'O', 'U'];
static assert(isInputRange!(typeof(vowels)));
auto x = randomSample
On Tuesday, 22 January 2013 at 10:53:16 UTC, mist wrote:
Short answer: unicode
Long answer is here:
http://dlang.org/phobos/std_range.html#.hasLength , please pay
attention to narrow string paragraph.
(failed constraint is hasLength!char[])
int is >= dchar so no issues for int.
Thanks !
Simply awsome