This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Use __debug_iterator instead of const_iterator to interact with the debug mode
AbandonedPublic

Authored by ldionne on Jun 8 2022, 3:19 PM.

Details

Reviewers
philnik
Group Reviewers
Restricted Project
Summary

This will become useful when adding the debug mode to classes that
don't have a const_iterator, such as std::span.

Diff Detail

Event Timeline

ldionne created this revision.Jun 8 2022, 3:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2022, 3:19 PM
ldionne requested review of this revision.Jun 8 2022, 3:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2022, 3:19 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik requested changes to this revision.Jun 8 2022, 3:26 PM
philnik added a subscriber: philnik.

How would it be useful? AFAICT you're not using __debug_iterator outside the class anywhere. Right now this only adds an indirection where none is needed.

This revision now requires changes to proceed.Jun 8 2022, 3:26 PM

How would it be useful? AFAICT you're not using __debug_iterator outside the class anywhere. Right now this only adds an indirection where none is needed.

As I mention in the review summary, it's useful e.g. for std::span, which doesn't have const_iterator. I uploaded DD127401 to show the follow-up.

ldionne planned changes to this revision.Jun 9 2022, 7:03 AM

Actually, upon making more progress on the successor to D127401, I'm not sure this will be relevant. Putting on the ice for now.

ldionne abandoned this revision.Jun 13 2022, 9:05 AM