[libcxx-commits] [PATCH] D101729: [libcxx] deprecates `std::iterator` and removes it as a base class
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 5 10:50:34 PDT 2021
EricWF added a comment.
Removing the `std::iterator` inheritance is potentially ABI breaking. In particular in the case of `reverse_iterator`.
If the iterator provided to `reverse_iterator` also inherits from `std::iterator`, then the first member of `reverse_iterator` goes from having an offset of 4 to an offset of 0 bytes
(because the compiler couldn't place the same empty base at the same address).
I'm not sure how much we care, but I see this being a case that could easily arise in real world code.
@ldionne thoughts?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101729/new/
https://reviews.llvm.org/D101729
More information about the libcxx-commits
mailing list