This is an archive of the discontinued LLVM Phabricator instance.

[libc++] ADL-proof vector<bool> by adding _VSTD:: qualification on calls.
ClosedPublic

Authored by Quuxplusone on Dec 16 2020, 3:32 PM.

Details

Summary

This affects only vectors with weird/malicious allocators, the same corner case covered in D91708, but for vector<bool> this time.

Also ADL-proof <__tree>, which affects only sets and maps with weird/malicious allocators where the ADL trap is in the fancy pointer type.

Also drive-by _VSTD:: qualification in the guts of std::bind, std::packaged_task, std::condition_variable.

I think this is likely the last of my ADL-proofing patches for a while; I know I've left some harmless (primitive-type-only) helpers in <locale> and <charconv>, but basically everything is ADL-proofed that can be, now, AFAIK. After this I'll probably spend a little time looking at constexpr algorithms again.

Diff Detail

Event Timeline

Quuxplusone requested review of this revision.Dec 16 2020, 3:32 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptDec 16 2020, 3:32 PM
ldionne accepted this revision.Jan 6 2021, 2:58 PM
This revision is now accepted and ready to land.Jan 6 2021, 2:58 PM