Why is size_t not a typedef

Freddy via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 7 13:05:51 PST 2014


Why is size_t an alias and not a typedef(or a struct that is not
implictly convertable)

----test.d
void main(){
      ulong a;
      size_t b=a;//only compiles on 64-bit
}
----
$ dmd -m64 test

$ dmd -m32 test
test.d(3): Error: cannot implicitly convert expression (a) of
type ulong to uint


More information about the Digitalmars-d mailing list