xxxxxxxxxx
import std.traits;
class WeightedRandom(T, W = float) if(isNumeric!W)
{
// Fields
private W[T] _pairs;
// The total sum of all the weights;
private W _probabilities;
/// Code...
}
void main()
{
auto wrnd = new WeightedRandom!char();
}