<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 23, 2013 at 4:58 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im"><span style="color:rgb(34,34,34)">Sure. I think it's even fine for a compiler warning, since sizeof(size_t) is a clearer way to get the same result.</span></div>
</div></blockquote><div><br></div><div>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.</div>
<div><br></div></div>-- <br>-Matt Calabrese
</div></div>