[libcxx-commits] [libcxx] [libc++] Fix strict aliasing violation for `deque::const_iterator` (PR #136067)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 9 06:16:24 PDT 2026
================
@@ -459,8 +470,9 @@ private:
__deque_iterator<_ValueType, _Pointer, _Reference, _MapPointer, _DiffType, _BlockSize>;
public:
- using __segment_iterator _LIBCPP_NODEBUG = _MapPointer;
- using __local_iterator _LIBCPP_NODEBUG = _Pointer;
+ using __segment_iterator _LIBCPP_NODEBUG =
+ __rebind_pointer_t<_Pointer, const __rebind_pointer_t<_Pointer, _ValueType> >;
----------------
philnik777 wrote:
```suggestion
using __segment_iterator _LIBCPP_NODEBUG = typename _Iterator::__map_iterator;
```
https://github.com/llvm/llvm-project/pull/136067
More information about the libcxx-commits
mailing list