The pattern from is the standard design for a modern C++ approach to sample from univariate distributions, which is also adapted in Boost-Random