This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Introduce DefensiveMin
and DefensiveMax
#12550
Labels
J0-enhancement
An additional feature request.
Z0-trivial
Writing the issue is of the same difficulty as patching the code.
Z6-mentor
An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Add traits to run min/max operations defensively. In some cases we use min/max but do not expect the else case to trigger. These traits would help with finding if these cases actually ever trigger.
Originally posted by @kianenigma in #12515 (comment)
trait
DefensiveMin
:defensive_min
by using<=
defensive_strict_min
by using<
trait
DefensiveMax
:defensive_max
by using>=
defensive_strict_max
by using>
The text was updated successfully, but these errors were encountered: