<div class="gmail_quote">On Sat, Jul 21, 2012 at 1:56 PM, Joe Groff <span dir="ltr"><<a href="mailto:arcata@gmail.com" target="_blank">arcata@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sat, Jul 21, 2012 at 1:46 PM, Rich E <<a href="mailto:reakinator@gmail.com">reakinator@gmail.com</a>> wrote:<br>
> I was doing this for a while, but I decided it was cluttering up the<br>
> includes section since you also need a check for __clang__<br>
<br>
</div>You can do something like this so you don't need to guard every single<br>
use of __has_include:<br>
<br>
#if !__clang__<br>
#define __has_include(x) 0<br>
#endif</blockquote><div><br></div><div>The recommended approach is</div><div><br></div><div>#ifndef __has_include</div><div>#define __has_include(x) 0</div><div>#endif </div><div><br></div><div>This would work correctly both in the presence of versions of clang which do not support __has_include, and for other compilers which do, but which don't claim to be clang.</div>
</div>