[libcxx-commits] [libcxx] [libc++] Fix possible out of range access in bitset (PR #121348)
Peng Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 16 08:05:16 PDT 2025
================
@@ -218,10 +220,10 @@ protected:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void flip() _NOEXCEPT;
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong() const {
- return to_ulong(integral_constant < bool, _Size< sizeof(unsigned long) * CHAR_BIT>());
+ return __to_ulong(_BoolConstant < _Size< sizeof(unsigned long) * CHAR_BIT>());
----------------
winner245 wrote:
Thanks for the suggestion! As you suggested, I have manually changed the spacing around `<` to have a better formatting. It is good to know that `clang-format` does not complain.
https://github.com/llvm/llvm-project/pull/121348
More information about the libcxx-commits
mailing list