[libc++] Comma-operator-proof a lot of algorithm/container code.
Detected by evil-izing the widely used `MoveOnly` testing type. I had to patch some tests that were themselves using its comma operator, but I think that's a worthwhile cost in order to catch more places in our headers that needed comma-proofing. The trick here is that even `++ptr, SomeClass()` can find a comma operator by ADL, if `ptr` is of type `Evil*`. (A comma between two operands of non-class-or-enum type is always treated as the built-in comma, without ADL. But if either operand is class-or-enum, then ADL happens for _both_ operands' types.) Differential Revision: https://reviews.llvm.org/D109414
Loading
Please sign in to comment