size_t + ptrdiff_t

Manu turkeyman at gmail.com
Sun Feb 19 09:04:16 PST 2012


On 19 February 2012 18:31, Stewart Gordon <smjg_1998 at yahoo.com> wrote:

> On 19/02/2012 15:26, Manu wrote:
> <snip>
>
>> There is code that assumes size_t is the width of the pointer, and other
>> code that assumes
>> size_t is the width of the native int.
>>
> <snip>
>
> How does it do that?
>
> Indeed, how does code rely on the concept of native int at all?


You can't imagine any situation where you might want to know how big an int
is?
Anything from calling convention code, structure layout/packing, copying
memory, basically optimising for 64bits at all...
Turn that question around... if you don't know the size of a native int,
how do you propose you take advantage of it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120219/0c0c4839/attachment-0001.html>


More information about the Digitalmars-d mailing list