isUniformRNG

Test if Range is a uniform random number generator. The overload taking an ElementType also makes sure that the RNG generates values of that type.

A uniform random number generator has at least the following features:

  • it is an InputRange
  • it has a bool isUniformRandom field readable in CTFE
  • its element type is a uniform integral type
  • it has min and max fields whose type is the same as the element type

This quite strict definition follows that in the C++11 standard. Note that the template is unable to enforce some required features, such as the requirement that the RNG's values must be drawn from the closed interval [min, max].

  1. template isUniformRNG(Range, ElementType)
    template isUniformRNG (
    Range
    ElementType
    ) {}
  2. template isUniformRNG(Range)

Members

Variables

isUniformRNG
enum bool isUniformRNG;
Undocumented in source.

Meta