mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2024-11-12 21:09:01 +00:00
fix warning for MSVC
This commit is contained in:
parent
9c037a7045
commit
b52f784219
4 changed files with 9 additions and 13 deletions
|
@ -343,9 +343,7 @@ namespace sprout {
|
|||
namespace detail {
|
||||
template<typename Div>
|
||||
SPROUT_CONSTEXPR typename std::remove_reference<decltype(std::declval<Div>().quot)>::type&
|
||||
div_at(Div& d, std::size_t i)
|
||||
SPROUT_NOEXCEPT_IF_EXPR(std::declval<Div>().quot)
|
||||
{
|
||||
div_at(Div& d, std::size_t i) {
|
||||
return i == 0 ? d.quot
|
||||
: i == 1 ? d.rem
|
||||
: (throw std::out_of_range("div_at: index out of range"), d.quot)
|
||||
|
@ -353,9 +351,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename Div>
|
||||
SPROUT_CONSTEXPR typename std::remove_reference<decltype(std::declval<Div>().quot)>::type const&
|
||||
div_at(Div const& d, std::size_t i)
|
||||
SPROUT_NOEXCEPT_IF_EXPR(std::declval<Div>().quot)
|
||||
{
|
||||
div_at(Div const& d, std::size_t i) {
|
||||
return i == 0 ? d.quot
|
||||
: i == 1 ? d.rem
|
||||
: (throw std::out_of_range("div_at: index out of range"), d.quot)
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace sprout {
|
|||
typename T,
|
||||
int N = 1,
|
||||
int R = sprout::typed_counter_detail::typed<T>::template state<
|
||||
sprout::typed_counter_detail::typed<T>::template counter(sprout::true_type(), typename sprout::typed_counter_detail::typed<T>::template tag<N - 1>()) + N - 1
|
||||
sprout::typed_counter_detail::typed<T>::counter(sprout::true_type(), typename sprout::typed_counter_detail::typed<T>::template tag<N - 1>()) + N - 1
|
||||
>::value
|
||||
>
|
||||
inline SPROUT_CONSTEXPR int counter() {
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace sprout {
|
|||
typename T,
|
||||
int N = 1,
|
||||
int R = sprout::typed_rand_detail::typed<T>::template state<
|
||||
sprout::typed_rand_detail::typed<T>::template counter(sprout::true_type(), typename sprout::typed_rand_detail::typed<T>::template tag<N - 1>()) + N - 1
|
||||
sprout::typed_rand_detail::typed<T>::counter(sprout::true_type(), typename sprout::typed_rand_detail::typed<T>::template tag<N - 1>()) + N - 1
|
||||
>::value
|
||||
>
|
||||
inline SPROUT_CONSTEXPR int rand() {
|
||||
|
@ -190,7 +190,7 @@ namespace sprout {
|
|||
typename T, unsigned Seed,
|
||||
int N = 1,
|
||||
int = sprout::typed_rand_detail::typed<T>::template state<
|
||||
sprout::typed_rand_detail::typed<T>::template counter(sprout::true_type(), typename sprout::typed_rand_detail::typed<T>::template tag<N - 1>()) + N - 1,
|
||||
sprout::typed_rand_detail::typed<T>::counter(sprout::true_type(), typename sprout::typed_rand_detail::typed<T>::template tag<N - 1>()) + N - 1,
|
||||
true, Seed
|
||||
>::value
|
||||
>
|
||||
|
@ -199,7 +199,7 @@ namespace sprout {
|
|||
typename T, unsigned Seed,
|
||||
int N = 1,
|
||||
int R = sprout::typed_rand_detail::typed<T>::template state<
|
||||
sprout::typed_rand_detail::typed<T>::template counter(sprout::true_type(), typename sprout::typed_rand_detail::typed<T>::template tag<N - 1>()) + N - 1,
|
||||
sprout::typed_rand_detail::typed<T>::counter(sprout::true_type(), typename sprout::typed_rand_detail::typed<T>::template tag<N - 1>()) + N - 1,
|
||||
true, Seed
|
||||
>::value
|
||||
>
|
||||
|
|
|
@ -106,7 +106,7 @@ namespace sprout {
|
|||
template<
|
||||
typename T,
|
||||
int N = 1,
|
||||
std::intmax_t R = sprout::typed_slot_detail::typed<T>::template val(sprout::true_type(), typename sprout::typed_slot_detail::typed<T>::template tag<N>())
|
||||
std::intmax_t R = sprout::typed_slot_detail::typed<T>::val(sprout::true_type(), typename sprout::typed_slot_detail::typed<T>::template tag<N>())
|
||||
>
|
||||
inline SPROUT_CONSTEXPR std::intmax_t slot() {
|
||||
return R;
|
||||
|
@ -120,7 +120,7 @@ namespace sprout {
|
|||
typename T, std::intmax_t Value,
|
||||
int N = 1,
|
||||
std::intmax_t = sprout::typed_slot_detail::typed<T>::template state<
|
||||
sprout::typed_slot_detail::typed<T>::template counter(sprout::true_type(), typename sprout::typed_slot_detail::typed<T>::template tag<N - 1>()) + N - 1,
|
||||
sprout::typed_slot_detail::typed<T>::counter(sprout::true_type(), typename sprout::typed_slot_detail::typed<T>::template tag<N - 1>()) + N - 1,
|
||||
Value
|
||||
>::value
|
||||
>
|
||||
|
@ -129,7 +129,7 @@ namespace sprout {
|
|||
typename T, std::intmax_t Value,
|
||||
int N = 1,
|
||||
std::intmax_t R = sprout::typed_slot_detail::typed<T>::template state<
|
||||
sprout::typed_slot_detail::typed<T>::template counter(sprout::true_type(), typename sprout::typed_slot_detail::typed<T>::template tag<N - 1>()) + N - 1,
|
||||
sprout::typed_slot_detail::typed<T>::counter(sprout::true_type(), typename sprout::typed_slot_detail::typed<T>::template tag<N - 1>()) + N - 1,
|
||||
Value
|
||||
>::value
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue