This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Unchanged behavior for a deque with elements of const type
AbandonedPublic

Authored by AdvenamTacet on May 30 2023, 10:07 PM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

This patch adds const to a few places, to make std::deque<const T> work as before D132092.
It makes compilation backward compatible.

Deque does not support const objects (objects have to be movable), so correct C++ code works with and without this patch, but there is no point in changing the behavior for incorrect code in D132092.

Diff Detail

Event Timeline

AdvenamTacet created this revision.May 30 2023, 10:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 30 2023, 10:07 PM
AdvenamTacet requested review of this revision.May 30 2023, 10:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 30 2023, 10:07 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
AdvenamTacet retitled this revision from [libc++][ASan] Annotating const types in deque old errors to [libc++] Unchanged behavior for a deque with elements of cont type.May 30 2023, 11:46 PM
AdvenamTacet edited the summary of this revision. (Show Details)
AdvenamTacet retitled this revision from [libc++] Unchanged behavior for a deque with elements of cont type to [libc++] Unchanged behavior for a deque with elements of const type.
AdvenamTacet abandoned this revision.May 31 2023, 6:51 PM

Because D132092 got reverted, I will include that change there.