0 is not a power of 2

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue May 19 12:56:19 PDT 2015


On 5/19/15 11:05 AM, Marco Leise wrote:
> While you are at it, you might also need "round pointer up to"
> and "round pointer down to", which can be implemented with bit
> ops for power-of-2 multiples.

Yah, there are plenty of those in 
https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/common.d. 
Improvements welcome. -- Andrei


More information about the Digitalmars-d mailing list