1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00

fix for clang3.7.0

This commit is contained in:
bolero-MURAKAMI 2015-10-13 19:59:06 +09:00
parent 8f33f038d1
commit cc5df1ee53
2 changed files with 8 additions and 8 deletions

View file

@ -229,7 +229,7 @@ namespace sprout {
}
template<typename Engine>
SPROUT_CXX14_CONSTEXPR result_type
generate(Engine& eng) const {
generate_cxx14(Engine& eng) const {
for (; ; ) {
RealType u = RealType();
RealType v = static_cast<RealType>(sprout::random::uniform_01<RealType>()(eng));
@ -750,8 +750,8 @@ namespace sprout {
return use_inversion() ? RealType(0.5) < p_
? t_ - invert(t_, 1 - p_, eng)
: invert(t_, p_, eng)
: RealType(0.5) < p_ ? t_ - generate(eng)
: generate(eng)
: RealType(0.5) < p_ ? t_ - generate_cxx14(eng)
: generate_cxx14(eng)
;
}
template<typename Engine>

View file

@ -34,7 +34,7 @@ namespace sprout {
template<typename Engine, typename T>
inline SPROUT_CXX14_CONSTEXPR T
generate_uniform_int(
generate_uniform_int_cxx14(
Engine& eng, T min_value, T max_value, std::true_type
)
{
@ -73,7 +73,7 @@ namespace sprout {
}
mult *= range_type(brange) + range_type(1);
}
range_type result_increment = sprout::random::detail::generate_uniform_int(
range_type result_increment = sprout::random::detail::generate_uniform_int_cxx14(
eng,
static_cast<range_type>(0),
static_cast<range_type>(range / mult),
@ -112,12 +112,12 @@ namespace sprout {
}
template<typename Engine, typename T>
inline SPROUT_CXX14_CONSTEXPR T
generate_uniform_int(
generate_uniform_int_cxx14(
Engine& eng, T min_value, T max_value, std::false_type
)
{
sprout::random::detail::uniform_int_float<Engine> wrapper(eng);
return sprout::random::detail::generate_uniform_int(wrapper, min_value, max_value, std::true_type());
return sprout::random::detail::generate_uniform_int_cxx14(wrapper, min_value, max_value, std::true_type());
}
template<typename Engine, typename T>
inline SPROUT_CXX14_CONSTEXPR T
@ -125,7 +125,7 @@ namespace sprout {
Engine& eng, T min_value, T max_value
)
{
return sprout::random::detail::generate_uniform_int(
return sprout::random::detail::generate_uniform_int_cxx14(
eng, min_value, max_value,
std::is_integral<typename Engine::result_type>()
);