On Wed, Oct 23, 2013 at 4:58 PM, Richard Smith <[email protected]>wrote:

> Sure. I think it's even fine for a compiler warning, since sizeof(size_t)
> is a clearer way to get the same result.
>

I know I'm a little late here, but I think the reason why you wouldn't want
to use sizeof(size_t) is that you need to include certain standard library
headers to pull in size_t, I.E. <cstddef>. The same goes for ptrdiff_t.
Doing sizeof(sizeof(whatever)) frees you from that requirement.

-- 
-Matt Calabrese
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to