Number of Bits Needed to Represent a Zero-Offset Integer

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 19 13:23:45 PST 2015


On Monday, 19 January 2015 at 20:54:50 UTC, Steven Schveighoffer 
wrote:
> Cool. I would point out that the commented code suggests you 
> should be handling the 0 case, but you are not (when T.min == 
> T.max)

I believe that should trigger a failing static assert with a good 
error message as it doesn't make any sense to call the function 
in that case. Thanks.


More information about the Digitalmars-d-learn mailing list