[libcxx-commits] [libcxx] [libc++] Fix possible out of range access in bitset (PR #121348)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 11 18:27:55 PDT 2025


================
@@ -80,7 +80,7 @@ public:
     constexpr bool operator[](size_t pos) const;
     reference operator[](size_t pos);            // constexpr since C++23
     unsigned long to_ulong() const;              // constexpr since C++23
-    unsigned long long to_ullong() const;        // constexpr since C++23
+    unsigned long long to_ullong() const;        // since C++11, constexpr since C++23
----------------
frederick-vs-ja wrote:

This is [LWG694](https://cplusplus.github.io/LWG/issue694). I don't think LWG694 retroactively applied to C++03 because `long long` was added in C++11 as a new feature. But since libc++ supports many C++11 features in C++03 mode, perhaps it's also fine not to mention "since C++11".

https://github.com/llvm/llvm-project/pull/121348


More information about the libcxx-commits mailing list