On 22 February 2012 02:19, Walter Bright <newshou...@digitalmars.com> wrote: > On 2/21/2012 1:03 AM, Artur Skawina wrote: >> >> Types like ptrdiff_t are not necessary in D, because you can write >> portable >> code using 'auto' and 'typeof()' - std C didn't have these, so a type had >> to be invented for everything. > > > And, in fact, object.di contains: > > > alias typeof(int.sizeof) size_t; > alias typeof(cast(void*)0 - cast(void*)0) ptrdiff_t;
But as far as I can see, size_t and ptrdiff_t have a special meaning inside the compiler, and you can change their alias at will (though I've never tried). -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';