problem with size_t and an easy solution

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 9 18:17:16 PST 2014


On Tue, 09 Dec 2014 16:55:22 +0000
Gary Willoughby via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> On Tuesday, 9 December 2014 at 16:10:10 UTC, ketmar via 
> Digitalmars-d wrote:
> > p.s. just out of curiousity: why do you need it? D int types has
> > well-defined size, so i can't see any sense in using C leftover.
> 
> I'm doing lots of pointer arithmetic so i've used uintptr_t in 
> various places.
ah, that one type. i was always wonder why it's missing in object.d[i].
but as `usize` is guaranteed to be big enough to hold the pointer and
`alias` doesn't create any new type, why don't just use
`usize`/`size_t`?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141210/f2c3f5a7/attachment.sig>


More information about the Digitalmars-d mailing list