Skip to content

Commit 5f102e3

Browse files
committed
redundancy
1 parent 08731cd commit 5f102e3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

libcxx/include/__algorithm/radix_sort.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Iterator __move_assign_please(_Iterator __i) {
6565

6666
template <class _UnsignedInteger>
6767
_LIBCPP_HIDE_FROM_ABI constexpr _UnsignedInteger __intlog2(_UnsignedInteger __n) {
68-
static_assert(is_integral<_UnsignedInteger>::value, "Must be an integral type");
69-
static_assert(is_unsigned<_UnsignedInteger>::value, "Must be unsigned");
68+
static_assert(is_unsigned<_UnsignedInteger>::value, "Must be unsigned integral");
7069

7170
return numeric_limits<_UnsignedInteger>::digits - 1 - std::__countl_zero(__n);
7271
}
@@ -94,7 +93,6 @@ __partial_sum_max(_InputIterator __first, _InputIterator __last, _OutputIterator
9493
template <class _Value, class _Map, class _Radix>
9594
struct __radix_sort_traits {
9695
using image_type = decay_t<invoke_result_t<_Map, _Value> >;
97-
static_assert(is_integral<image_type>::value, "");
9896
static_assert(is_unsigned<image_type>::value, "");
9997

10098
using radix_type = decay_t<invoke_result_t<_Radix, image_type> >;
@@ -108,7 +106,6 @@ struct __radix_sort_traits {
108106
template <class _Value, class _Map>
109107
struct __counting_sort_traits {
110108
using image_type = decay_t<invoke_result_t<_Map, _Value> >;
111-
static_assert(is_integral<image_type>::value, "");
112109
static_assert(is_unsigned<image_type>::value, "");
113110

114111
constexpr static const auto __value_range = numeric_limits<image_type>::max() + 1;
@@ -119,7 +116,6 @@ template <class _Radix>
119116
_LIBCPP_HIDE_FROM_ABI auto __nth_radix(size_t __radix_number, _Radix __radix) {
120117
return [__radix_number, __radix = std::move(__radix)](auto __n) {
121118
using value_type = decltype(__n);
122-
static_assert(is_integral<value_type>::value, "");
123119
static_assert(is_unsigned<value_type>::value, "");
124120
using traits = __counting_sort_traits<value_type, _Radix>;
125121

@@ -348,7 +344,6 @@ struct __identity_fn {
348344
struct __low_byte_fn {
349345
template <class _Ip>
350346
_LIBCPP_HIDE_FROM_ABI constexpr uint8_t operator()(_Ip __integer) const {
351-
static_assert(is_integral<_Ip>::value, "");
352347
static_assert(is_unsigned<_Ip>::value, "");
353348

354349
return static_cast<uint8_t>(__integer & 0xff);

0 commit comments

Comments
 (0)