D-Programming-Language/phobos — pull request #2051 by tom-tan (2014-03-26 11:30:06+00:00)
Title: Mark methods for random number generators in std.random as safe pure not...

...hrow

This pull request marks methods for `std.random.LinearCongruentialEngine`, `MersenneTwisterEngine`, and `XorshiftEngine` as safe, pure, and nothrow.
They only takes integral types as the template arguments and they do not use any unsafe/impure/throwable operations.

I leave some unittests for them as is because they use `unpredictableSeed` which is currently a system and nothrow function (of course it is an impure function).

Off topic:
`unpredictableSeed` uses unsafe cast (but I guess it can be trusted) and `core.thread.Thread.getThis`.
I did not send pull request to make `Thread.getThis` safe and nothrow because I am not familiar with thread programming...