New repo for my reusable D Phobos extensions

ag0aep6g via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Apr 10 13:54:31 PDT 2016


On Sunday, 10 April 2016 at 20:24:41 UTC, Nordlöw wrote:
> On Saturday, 9 April 2016 at 23:49:14 UTC, ag0aep6g wrote:
>> <https://github.com/nordlow/phobos-next/blob/596da6eb534926ee0d94e9f711a169e58026688e/src/bitop_ex.d#L88>,
>> <https://github.com/nordlow/phobos-next/blob/596da6eb534926ee0d94e9f711a169e58026688e/src/bitop_ex.d#L144>:
>>
>> Changing arbitrary bits in arbitrary types is the opposite of 
>> memory-safe.
>
> These operate only on integer types thanks to isIntegral 
> template constraint. Are you saying I need to limit to machine 
> types u?int{8,16,32,64,12} to not include BigInt? If so is 
> there a trait for this?

No, these are the overloads for non-integer T. The constraint 
says `!(isIntegral!T)`. The integer overloads are above the ones 
I linked, respectively.


More information about the Digitalmars-d-announce mailing list