Casey's accumulated miscellaneous changes by CaseyCarter · Pull Request #4900 · microsoft/STL (original) (raw)
... since the exposition-only concept doesn't allow for construction of an object of decayed type from a model of boolean-testable. Note that the changes in erase_if(forward_list, pred)
and erase_if(list, pred)
are the proposed resolution of LWG-4135, which I feel is a no-brainer and can be implemented without comments. I audited for other occurrences after noticing we do the same thing in forward_list::remove
and list::remove
.
The fold expressions in <ranges>
are a weird case: they are only problematic when the pack has one element. For zero or more than one elements, the fold expression has type bool
, but with exactly one element it's a boolean-testable that the lambda implicitly decays on return. I think it's a bit more elegant to fix these by adding || false
to the fold expressions to make them binary than to explicitly specify the return type of the lambda.