A more general bsr/bsf implementation
safety0ff via Digitalmars-d
digitalmars-d at puremagic.com
Sun Apr 12 07:41:38 PDT 2015
On Sunday, 12 April 2015 at 11:53:41 UTC, Johan Engelen wrote
> My questions:
> 1) Is it OK to put a more general bsf/bsr in druntime or in
> Phobos? (if Phobos: in which package to put it?)
IMO I want a std.integer package for such functions.
I started writing one but I have to rewrite it.
I don't know if building up such a package by piecemeal would be
accepted.
> 2) Is the current sign-extend up to size_t's width really
> intended behavior?
It's due to integer promotions, so it should only influence bsr
(when it is called with a signed type.)
More information about the Digitalmars-d
mailing list