size_t vs uintptr_t

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 15 11:18:42 PDT 2016


On 6/15/2016 9:31 AM, Steven Schveighoffer wrote:
> I think you guys are missing the point.
>
> I can check for 64-bit alignment by casting to ubyte:
>
> ((cast(ubyte)ptr) & 0x07) == 0
>
> Walter: I don't see why the optimizer doesn't figure out the fastest way to do
> this, even with size_t. You are logic-anding a constant.

You're right.


More information about the Digitalmars-d mailing list