C++ Logo

std-proposals

Advanced search

Re: integer types by bit size

From: Edward Catmur <ecatmur_at_[hidden]>
Date: Tue, 27 Jul 2021 10:33:50 +0100
On Tue, 27 Jul 2021, 09:03 Baruch Burstein via Std-Proposals, <
std-proposals_at_[hidden]> wrote:

> Hi,
> I have this code laying around for a long time. I know I used it, but I
> can't remember what my use-case was. However, it is simple enough. I think
> it may be worth adding it if someone can think of a use case.
> https://gist.github.com/BMBurstein/e5d746ae3d64e6e2c80e22b9ada54c24
> Basically, it allows you to get an integer type based on a templated bit
> size, i.e. sized_ints<40>::int_least_t will be an integer type with at
> least 40 bits.
>

There is an equivalent facility in Boost.Integer, I think.

>

Received on 2021-07-27 04:34:04