mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-11-14 10:39:05 +00:00
fix for clang3.7.0
This commit is contained in:
parent
8f33f038d1
commit
cc5df1ee53
2 changed files with 8 additions and 8 deletions
|
@ -229,7 +229,7 @@ namespace sprout {
|
||||||
}
|
}
|
||||||
template<typename Engine>
|
template<typename Engine>
|
||||||
SPROUT_CXX14_CONSTEXPR result_type
|
SPROUT_CXX14_CONSTEXPR result_type
|
||||||
generate(Engine& eng) const {
|
generate_cxx14(Engine& eng) const {
|
||||||
for (; ; ) {
|
for (; ; ) {
|
||||||
RealType u = RealType();
|
RealType u = RealType();
|
||||||
RealType v = static_cast<RealType>(sprout::random::uniform_01<RealType>()(eng));
|
RealType v = static_cast<RealType>(sprout::random::uniform_01<RealType>()(eng));
|
||||||
|
@ -750,8 +750,8 @@ namespace sprout {
|
||||||
return use_inversion() ? RealType(0.5) < p_
|
return use_inversion() ? RealType(0.5) < p_
|
||||||
? t_ - invert(t_, 1 - p_, eng)
|
? t_ - invert(t_, 1 - p_, eng)
|
||||||
: invert(t_, p_, eng)
|
: invert(t_, p_, eng)
|
||||||
: RealType(0.5) < p_ ? t_ - generate(eng)
|
: RealType(0.5) < p_ ? t_ - generate_cxx14(eng)
|
||||||
: generate(eng)
|
: generate_cxx14(eng)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
template<typename Engine>
|
template<typename Engine>
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace sprout {
|
||||||
|
|
||||||
template<typename Engine, typename T>
|
template<typename Engine, typename T>
|
||||||
inline SPROUT_CXX14_CONSTEXPR T
|
inline SPROUT_CXX14_CONSTEXPR T
|
||||||
generate_uniform_int(
|
generate_uniform_int_cxx14(
|
||||||
Engine& eng, T min_value, T max_value, std::true_type
|
Engine& eng, T min_value, T max_value, std::true_type
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -73,7 +73,7 @@ namespace sprout {
|
||||||
}
|
}
|
||||||
mult *= range_type(brange) + range_type(1);
|
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,
|
eng,
|
||||||
static_cast<range_type>(0),
|
static_cast<range_type>(0),
|
||||||
static_cast<range_type>(range / mult),
|
static_cast<range_type>(range / mult),
|
||||||
|
@ -112,12 +112,12 @@ namespace sprout {
|
||||||
}
|
}
|
||||||
template<typename Engine, typename T>
|
template<typename Engine, typename T>
|
||||||
inline SPROUT_CXX14_CONSTEXPR T
|
inline SPROUT_CXX14_CONSTEXPR T
|
||||||
generate_uniform_int(
|
generate_uniform_int_cxx14(
|
||||||
Engine& eng, T min_value, T max_value, std::false_type
|
Engine& eng, T min_value, T max_value, std::false_type
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
sprout::random::detail::uniform_int_float<Engine> wrapper(eng);
|
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>
|
template<typename Engine, typename T>
|
||||||
inline SPROUT_CXX14_CONSTEXPR T
|
inline SPROUT_CXX14_CONSTEXPR T
|
||||||
|
@ -125,7 +125,7 @@ namespace sprout {
|
||||||
Engine& eng, T min_value, T max_value
|
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,
|
eng, min_value, max_value,
|
||||||
std::is_integral<typename Engine::result_type>()
|
std::is_integral<typename Engine::result_type>()
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue