C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Modular integers

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 13 Jan 2026 15:26:39 -0800
On Tuesday, 13 January 2026 13:53:58 Pacific Standard Time Hans Ã…berg wrote:
> > In fact, the answer you gave has absolutely nothing to do with Marcin's
> > statement. Marcin said that if the compiler implements support for 256-bit
> > integers, then it won't need to expand and instantiate templates, which in
> > -O0 mode means there are no non-inlined inline functions.
>
> But that is the very point: the templates recurse down half-words until
> there is an implementation. So in your example, it will just call the
> 256-bit specialized function that is implemented.

And again you're missing the point: why can the template do this but the
compiler-provided implementation can't?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.

Received on 2026-01-13 23:26:44