forked from boostorg/beast
Remove unused type_traits
close #1337 Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
committed by
Vinnie Falco
parent
b3a8e6edb5
commit
587929edf6
@@ -150,86 +150,6 @@ struct is_contiguous_container<T, E, void_t<
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template<class...>
|
||||
struct unwidest_unsigned;
|
||||
|
||||
template<class U0>
|
||||
struct unwidest_unsigned<U0>
|
||||
{
|
||||
using type = U0;
|
||||
};
|
||||
|
||||
template<class U0, class... UN>
|
||||
struct unwidest_unsigned<U0, UN...>
|
||||
{
|
||||
BOOST_STATIC_ASSERT(std::is_unsigned<U0>::value);
|
||||
using type = typename std::conditional<
|
||||
(sizeof(U0) < sizeof(typename unwidest_unsigned<UN...>::type)),
|
||||
U0, typename unwidest_unsigned<UN...>::type>::type;
|
||||
};
|
||||
|
||||
template<class...>
|
||||
struct widest_unsigned;
|
||||
|
||||
template<class U0>
|
||||
struct widest_unsigned<U0>
|
||||
{
|
||||
using type = U0;
|
||||
};
|
||||
|
||||
template<class U0, class... UN>
|
||||
struct widest_unsigned<U0, UN...>
|
||||
{
|
||||
BOOST_STATIC_ASSERT(std::is_unsigned<U0>::value);
|
||||
using type = typename std::conditional<
|
||||
(sizeof(U0) > sizeof(typename widest_unsigned<UN...>::type)),
|
||||
U0, typename widest_unsigned<UN...>::type>::type;
|
||||
};
|
||||
|
||||
template<class U>
|
||||
inline
|
||||
constexpr
|
||||
U
|
||||
min_all(U u)
|
||||
{
|
||||
BOOST_STATIC_ASSERT(std::is_unsigned<U>::value);
|
||||
return u;
|
||||
}
|
||||
|
||||
template<class U0, class U1, class... UN>
|
||||
inline
|
||||
constexpr
|
||||
typename unwidest_unsigned<U0, U1, UN...>::type
|
||||
min_all(U0 u0, U1 u1, UN... un)
|
||||
{
|
||||
using type =
|
||||
typename unwidest_unsigned<U0, U1, UN...>::type;
|
||||
return u0 < u1 ?
|
||||
static_cast<type>(min_all(u0, un...)) :
|
||||
static_cast<type>(min_all(u1, un...));
|
||||
}
|
||||
|
||||
template<class U>
|
||||
inline
|
||||
constexpr
|
||||
U
|
||||
max_all(U u)
|
||||
{
|
||||
BOOST_STATIC_ASSERT(std::is_unsigned<U>::value);
|
||||
return u;
|
||||
}
|
||||
|
||||
template<class U0, class U1, class... UN>
|
||||
inline
|
||||
constexpr
|
||||
typename widest_unsigned<U0, U1, UN...>::type
|
||||
max_all(U0 u0, U1 u1, UN... un)
|
||||
{
|
||||
return u0 > u1? max_all(u0, un...) : max_all(u1, un...);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template<class T, class = void>
|
||||
struct get_lowest_layer_helper
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user