You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns: a month with m_ equal to the sum of unsigned{x} and y.count(), reduced modulo 12 to an integer in [1, 12].
or something like that, rather than defining an auxiliary modulo(n, 12) function and going on an excursion to a definition of Euclidean division.
One problem: this is not entirely editorial, as the new wording does not admit any undefined behavior, whereas the description in the existing wording results in UB when long long and months' representation type are the same size and the months value is nearly LLONG_MAX. The undefined behavior here does not appear to be especially useful; implementations can easily produce the correct result by reducing the months value modulo 12 first, if they chose a representation type for months that is the same size as long long.