[libcxx-commits] [libcxx] [libc++] Fix strict aliasing violation for `deque::const_iterator` (PR #136067)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Dec 15 04:36:11 PST 2025
================
@@ -282,7 +293,18 @@ template <class _ValueType,
# endif
>
class __deque_iterator {
- typedef _MapPointer __map_iterator;
+ using __map_iterator _LIBCPP_NODEBUG = __get_deque_map_iterator<_ValueType, _MapPointer>;
----------------
frederick-vs-ja wrote:
It isn't. As noted in the comments, what we want is `FancyPtr<const FancyPtr<_ValueType>>` here (if the iterator is const), but not `FancyPtr<_ValueType>`.
https://github.com/llvm/llvm-project/pull/136067
More information about the libcxx-commits
mailing list