Skip to content

Commit 7a4133f

Browse files
committed
Add _LIBCPP_ASSERT_INTERNAL
1 parent 4e24670 commit 7a4133f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libcxx/include/bitset

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,11 @@ protected:
464464
return __const_reference(&__first_, __storage_type(1) << __pos);
465465
}
466466
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 __iterator __make_iter(size_t __pos) _NOEXCEPT {
467+
_LIBCPP_ASSERT_INTERNAL(__pos < __bits_per_word, "Out of bounds access in the single word bitset implementation.");
467468
return __iterator(&__first_, __pos);
468469
}
469470
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 __const_iterator __make_iter(size_t __pos) const _NOEXCEPT {
471+
_LIBCPP_ASSERT_INTERNAL(__pos < __bits_per_word, "Out of bounds access in the single word bitset implementation.");
470472
return __const_iterator(&__first_, __pos);
471473
}
472474

0 commit comments

Comments
 (0)