basic_string::replace() has the below line
sz += n2 - __n1;
which fails overflow checks if n1 > n2, as the negative result
from the subtraction then overflows the original __sz when added to
it.
This behavior is valid as unsigned integer overflow is defined to wrap
around the maximum value and that produces the correct final value for
__sz. Therefore, we disable this check on this function.
Please put this comment inside one of the function bodies, right above the offending line.
I think putting it here will result in it maybe becoming unmaintained.