Skip to content

Commit c4d3fba

Browse files
smundhra-gitshlok-invincibleStephanTLavavej
authored
Remove remove_cv_t from standard integer type checks (#5946)
Co-authored-by: [email protected] <[email protected]> Co-authored-by: Stephan T. Lavavej <[email protected]>
1 parent 0839948 commit c4d3fba

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

stl/inc/__msvc_bit_utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ _NODISCARD int _Checked_popcount(const _Ty _Val) noexcept {
310310

311311
template <class _Ty>
312312
constexpr bool _Is_standard_unsigned_integer =
313-
_Is_any_of_v<remove_cv_t<_Ty>, unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long>;
313+
_Is_any_of_v<_Ty, unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long>;
314314

315315
template <class _Ty, enable_if_t<_Is_standard_unsigned_integer<_Ty>, int> = 0>
316316
_NODISCARD _CONSTEXPR20 int _Countr_zero(const _Ty _Val) noexcept {

stl/inc/mdspan

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private:
147147
_STL_INTERNAL_STATIC_ASSERT(is_convertible_v<const _OtherIndexType&, index_type>
148148
&& is_nothrow_constructible_v<index_type, const _OtherIndexType&>);
149149
#if _ITERATOR_DEBUG_LEVEL != 0
150-
if constexpr (_Is_standard_integer<_OtherIndexType> && _Rank_dynamic != 0) {
150+
if constexpr (_Is_standard_integer<remove_cv_t<_OtherIndexType>> && _Rank_dynamic != 0) {
151151
_STL_VERIFY(((_Dynamic_exts[_Indices] >= 0 && _STD in_range<index_type>(_Dynamic_exts[_Indices])) && ...),
152152
"exts[r] must be representable as a nonnegative value of type index_type for every rank index r "
153153
"(N4950 [mdspan.extents.cons]/10.2)");
@@ -162,7 +162,7 @@ private:
162162
_STL_INTERNAL_STATIC_ASSERT(is_convertible_v<const _OtherIndexType&, index_type>
163163
&& is_nothrow_constructible_v<index_type, const _OtherIndexType&>);
164164
#if _ITERATOR_DEBUG_LEVEL != 0
165-
if constexpr (_Is_standard_integer<_OtherIndexType>) {
165+
if constexpr (_Is_standard_integer<remove_cv_t<_OtherIndexType>>) {
166166
for (rank_type _Idx = 0; _Idx < _Rank; ++_Idx) {
167167
_STL_VERIFY(
168168
_Static_extents[_Idx] == dynamic_extent || _STD cmp_equal(_Static_extents[_Idx], _Mixed_exts[_Idx]),

stl/inc/utility

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,8 +949,8 @@ _NODISCARD constexpr bool _In_range(const _Ty _Value) noexcept {
949949

950950
#if _HAS_CXX20
951951
template <class _Ty>
952-
constexpr bool _Is_standard_integer = _Is_any_of_v<remove_cv_t<_Ty>, signed char, short, int, long, long long,
953-
unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long>;
952+
constexpr bool _Is_standard_integer = _Is_any_of_v<_Ty, signed char, short, int, long, long long, unsigned char,
953+
unsigned short, unsigned int, unsigned long, unsigned long long>;
954954

955955
_EXPORT_STD template <class _Ty1, class _Ty2>
956956
_NODISCARD constexpr bool cmp_equal(const _Ty1 _Left, const _Ty2 _Right) noexcept {

0 commit comments

Comments
 (0)