C++ Logo

std-proposals

Advanced search

Re: [std-proposals] D3724 Integer division

From: Jan Schultke <janschultke_at_[hidden]>
Date: Sun, 1 Jun 2025 18:45:23 +0200
Jens has already answered these concerns for the most part, but here
are some missing things:

> Features makes C++ bigger/harder to support

The proposed functions can be implemented as pure library features
with no dependence on intrinsics. The only hardware dependence is that
fundamental operations like / and * have to work, but that's required
of any conforming C++ implementation anyway, as Jens said.

Given that ceiling integer division is well-motivated, commonly
implemented (incorrectly) by users, and almost trivial to implement,
it's a good fit for the standard library.

> So why the same reason that would make WG 14 not want it in the standard not apply here?

Because the feature is too portable. It's not really abstracting from
hardware like <bit>, just providing utility. I'm not sure if WG14 is
open to adding library features that can reasonably exist outside the
standard library.

Again, these are entirely different languages with different
committees, different design standards, different use cases,
different users.

Received on 2025-06-01 16:45:38