C++ Logo

std-proposals

Advanced search

Re: Reserve good keywords for floating point types

From: Andrey Semashev <andrey.semashev_at_[hidden]>
Date: Tue, 15 Oct 2019 21:51:02 +0300
On 2019-10-15 20:33, Thiago Macieira via Std-Proposals wrote:
>
> Also, don't forget uinptr_t, size_t and ptrdiff_t. You *really* shouldn't use
> a specific bit count when dealing with object sizes and pointers.
>
> That means you don't need uint32_t for counting the elements in an array that
> you declared in your function. int, size_t or ptrdiff_t would be just fine.

Actually, you do, if you want to be efficient. Most of the time you
don't need 64-bit size_t to represent element count or object sizes.
Storing size_t would just waste space.

Received on 2019-10-15 13:53:21