size_t + ptrdiff_t

Walter Bright newshound2 at digitalmars.com
Tue Feb 21 18:19:43 PST 2012


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;


More information about the Digitalmars-d mailing list