[Issue 1536] Literal '0' is improperly used to deduce an implicit template parameter

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 28 11:17:40 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1536





------- Comment #1 from regan at netmail.co.nz  2007-09-28 13:17 -------
A decimal literal within the range of 0 .. 2_147_483_647 is assumed to be of
type int, it's in the docs:

http://www.digitalmars.com/d/lex.html#integerliteral

"The type of the integer is resolved as follows:

Decimal Literal         Type
0 .. 2_147_483_647      int
2_147_483_648 .. 9_223_372_036_854_775_807L     long

Decimal Literal, L Suffix       Type
0L .. 9_223_372_036_854_775_807L        long

Decimal Literal, U Suffix       Type
0U .. 4_294_967_296U    uint
4_294_967_296U .. 18_446_744_073_709_551_615UL  ulong

Decimal Literal, UL Suffix      Type
0UL .. 18_446_744_073_709_551_615UL     ulong
"


-- 



More information about the Digitalmars-d-bugs mailing list