<div class="gmail_quote">On 21 January 2012 22:18, Timon Gehr <span dir="ltr"><<a href="mailto:timon.gehr@gmx.ch">timon.gehr@gmx.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 01/21/2012 09:06 PM, Alex Rønne Petersen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I needed a native-size signed integer type this other day and was just<br>
kinda wondering: Why don't we have this in object.di? isize_t or whatever?<br>
<br>
(I have a feeling this has been asked before, but my search-fu is weak<br>
today seemingly...)<br>
<br>
</blockquote>
<br></div></div>
.object.ptrdiff_t<br>
</blockquote></div><br><div>I don't necessarily think ptrdiff_t and signed size_t are the same thing.</div><div>Surely size_t should represent the systems native word width? ptrdiff_t represents the size of a pointer, which is NOT necessarily the same as the native word width.</div>
<div>There are quite a few 64 bit systems that retain 32bit pointers. I would thing ssize_t is safer than using ptrdiff_t, and certainly, both should exist.</div>