digitalmars.D.learn - Shorthand for defining numeric literals as size_t and ptrdiff_t
- pineapple (3/3) Jun 23 2016 There are suffixes for numbers like 0L, 0u, 0f, 0d, etc. What
- Steven Schveighoffer (5/7) Jun 23 2016 They do not exist, because the types themselves are not
There are suffixes for numbers like 0L, 0u, 0f, 0d, etc. What about suffixes representing size_t and ptrdiff_t? Do they exist? If not, why?
Jun 23 2016
On 6/23/16 6:22 PM, pineapple wrote:There are suffixes for numbers like 0L, 0u, 0f, 0d, etc. What about suffixes representing size_t and ptrdiff_t? Do they exist? If not, why?They do not exist, because the types themselves are not compiler-builtin, they are aliases to the appropriate integer types. But you can use constructor syntax: size_t(0) ptrdiff_t(0) -Steve
Jun 23 2016