Created attachment 1243 [details] Example code to illustrate the bug. Comment out last line and the program runs correctly. MersenneTwisterEngine can take as seed either a single unsigned integer or a range of 624 unsigned integers. However, if a static array uint[624] is passed to it, it fails with the following error: ---------------------------------------------- Error: template std.random.MersenneTwisterEngine!(uint, 32, 624, 397, 31, 2567483615u, 11, 7, 2636928640u, 15, 4022730752u, 18).MersenneTwisterEngine.seed does not match any function template declaration. Candidates are: /opt/dmd/include/d2/std/random.d(574): std.random.MersenneTwisterEngine!(uint, 32, 624, 397, 31, 2567483615u, 11, 7, 2636928640u, 15, 4022730752u, 18).MersenneTwisterEngine.seed()(UIntType value = defaultSeed) /opt/dmd/include/d2/std/random.d(613): std.random.MersenneTwisterEngine!(uint, 32, 624, 397, 31, 2567483615u, 11, 7, 2636928640u, 15, 4022730752u, 18).MersenneTwisterEngine.seed(T)(T range) if (isInputRange!T && is(Unqual!(ElementType!T) == UIntType)) mtseed.d(10): Error: template std.random.MersenneTwisterEngine!(uint, 32, 624, 397, 31, 2567483615u, 11, 7, 2636928640u, 15, 4022730752u, 18).MersenneTwisterEngine.seed()(UIntType value = defaultSeed) cannot deduce template function from argument types !()(uint[624LU]) ---------------------------------------------- The attached test code illustrates the problem, with Mt19937 accepting a dynamic array of length 624 as seed, but not a static array of equal length.
A static array is not an input range, it can't be consumed. The constaint in see() clearly only takes input ranges.