On 24 January 2012 12:32, Stewart Gordon <smjg_1...@yahoo.com> wrote: > On 24/01/2012 10:37, Don Clugston wrote: > <snip> > >> IMHO the ideal solution would be: >> - treat size_t as a magical type (not a simple alias). >> - allow size_t -> uint if you are in a machine-specific version statement >> that implies 32 >> bits (eg, version(D_InlineAsm_X86), version(Win32), version(X86)). >> - allow size_t -> ulong if you are in a version statement that implies 64 >> bits. >> - Otherwise, disallow implicit casts. > > <snip> > > And have what rules for implicit conversions _to_ size_t? > > Stewart.
Any unsigned integral types with the same or smaller IntRange than size_t would be allowed, I would have thought... ie: only ulong -> size_t needs explicit casting on 32bit systems. -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';