Copy link
@jzmaddock

jzmaddock Feb 28, 2015

Contributor

Unfortunately this fix breaks Boost.Multiprecision because for example min_value / 2 becomes an expression template and not a number. Adding a static_cast as in:

generate_uniform_real(eng, static_cast(min_value / 2), static_cast(max_value / 2));

Fixes things, and should be harmless for any other number type.

Longer term I need to look at the whole Multiprecision/Random interoperability issue in more detail. In principle are you open to more patches to address whatever issues there are? Plus some test cases to detect issues like this?

Thanks, John.