In https://github.com/microsoft/STL/pull/3972#discussion_r1322286522, @CaseyCarter observed: > `_Calculate` computes the product in `index_type`, which may overflow into UB land even for some values that are representable in `size_type`.