digitalmars.D - std.experimental.logger logging function __LINE__ parameter type
- ric maicle (5/5) Jan 10 2020 I recently noticed that the type of __LINE__ argument in the
- Steven Schveighoffer (6/13) Jan 10 2020 Only if you intend to have files with 2 billion+ lines?
I recently noticed that the type of __LINE__ argument in the std.experimental.logger functions is 'int'. Shouldn't the argument type be size_t since __LINE__ is type size_t? Using DMD 2.090.0 ric
Jan 10 2020
On 1/10/20 11:56 AM, ric maicle wrote:I recently noticed that the type of __LINE__ argument in the std.experimental.logger functions is 'int'. Shouldn't the argument type be size_t since __LINE__ is type size_t? Using DMD 2.090.0 ricOnly if you intend to have files with 2 billion+ lines? But actually, it's probably good to change it. It works because it's known at compile-time, so VRP will allow the implicit downcast. -Steve
Jan 10 2020