1
0
Fork 0
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:
bolero-MURAKAMI 2019-01-14 15:59:19 +09:00
parent 9c037a7045
commit b52f784219
4 changed files with 9 additions and 13 deletions

View file

@ -343,9 +343,7 @@ namespace sprout {
namespace detail { namespace detail {
template<typename Div> template<typename Div>
SPROUT_CONSTEXPR typename std::remove_reference<decltype(std::declval<Div>().quot)>::type& SPROUT_CONSTEXPR typename std::remove_reference<decltype(std::declval<Div>().quot)>::type&
div_at(Div& d, std::size_t i) div_at(Div& d, std::size_t i) {
SPROUT_NOEXCEPT_IF_EXPR(std::declval<Div>().quot)
{
return i == 0 ? d.quot return i == 0 ? d.quot
: i == 1 ? d.rem : i == 1 ? d.rem
: (throw std::out_of_range("div_at: index out of range"), d.quot) : (throw std::out_of_range("div_at: index out of range"), d.quot)
@ -353,9 +351,7 @@ namespace sprout {
} }
template<typename Div> template<typename Div>
SPROUT_CONSTEXPR typename std::remove_reference<decltype(std::declval<Div>().quot)>::type const& SPROUT_CONSTEXPR typename std::remove_reference<decltype(std::declval<Div>().quot)>::type const&
div_at(Div const& d, std::size_t i) div_at(Div const& d, std::size_t i) {
SPROUT_NOEXCEPT_IF_EXPR(std::declval<Div>().quot)
{
return i == 0 ? d.quot return i == 0 ? d.quot
: i == 1 ? d.rem : i == 1 ? d.rem
: (throw std::out_of_range("div_at: index out of range"), d.quot) : (throw std::out_of_range("div_at: index out of range"), d.quot)

View file

@ -84,7 +84,7 @@ namespace sprout {
typename T, typename T,
int N = 1, int N = 1,
int R = sprout::typed_counter_detail::typed<T>::template state< 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 >::value
> >
inline SPROUT_CONSTEXPR int counter() { inline SPROUT_CONSTEXPR int counter() {

View file

@ -175,7 +175,7 @@ namespace sprout {
typename T, typename T,
int N = 1, int N = 1,
int R = sprout::typed_rand_detail::typed<T>::template state< 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 >::value
> >
inline SPROUT_CONSTEXPR int rand() { inline SPROUT_CONSTEXPR int rand() {
@ -190,7 +190,7 @@ namespace sprout {
typename T, unsigned Seed, typename T, unsigned Seed,
int N = 1, int N = 1,
int = sprout::typed_rand_detail::typed<T>::template state< 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 true, Seed
>::value >::value
> >
@ -199,7 +199,7 @@ namespace sprout {
typename T, unsigned Seed, typename T, unsigned Seed,
int N = 1, int N = 1,
int R = sprout::typed_rand_detail::typed<T>::template state< 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 true, Seed
>::value >::value
> >

View file

@ -106,7 +106,7 @@ namespace sprout {
template< template<
typename T, typename T,
int N = 1, 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() { inline SPROUT_CONSTEXPR std::intmax_t slot() {
return R; return R;
@ -120,7 +120,7 @@ namespace sprout {
typename T, std::intmax_t Value, typename T, std::intmax_t Value,
int N = 1, int N = 1,
std::intmax_t = sprout::typed_slot_detail::typed<T>::template state< 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
>::value >::value
> >
@ -129,7 +129,7 @@ namespace sprout {
typename T, std::intmax_t Value, typename T, std::intmax_t Value,
int N = 1, int N = 1,
std::intmax_t R = sprout::typed_slot_detail::typed<T>::template state< 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
>::value >::value
> >