On 1/19/15 3:46 PM, "Nordlöw" wrote:
On Monday, 19 January 2015 at 13:30:47 UTC, Steven Schveighoffer wrote:
http://dlang.org/phobos/core_bitop.html#.bsr

It's actually an intrinsic, reduces to an instruction. Mind the
requirements for 0.

This works for me

https://github.com/nordlow/justd/blob/master/traits_ex.d#L406

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)

-Steve

Reply via email to