r/wg21
P3724R3 - Integer division LEWG
Posted by u/div_ties_to_meme_cpp

Document: P3724R3

Author: Jan Schultke

Date: 2026-02-20

Audience: LEWG Library Evolution

This paper adds a small but sharp toolbox around integer division: named rounding modes (toward negative infinity, positive infinity, away from zero, ties-to-even, and friends), paired remainder helpers, and a safer story than hoping / and % always match the semantics you think you have. Library people will care because it is the kind of API that either prevents subtle off-by-one finance bugs or becomes yet another overload zoo if the design is wrong. Skim the wording on P3724R3 at wg21.link if you want the actual div_rem_* surface spelled out.

▲ 41 points · 0 comments
sorted by: best