<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, 8 Jun 2015 at 20:57 Edward Diener <<a href="mailto:eldlistmailingz@tropicsoft.com">eldlistmailingz@tropicsoft.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">How can I tell at compile time through predefined macros whether libc++<br>
includes/supports the C++14 header file shared_mutex ?<br></blockquote><div><br></div><div>If you just want to see whether the header exists, and are using Clang or GCC 5, you can use __has_include:</div><div><br></div><div><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__clang.llvm.org_docs_LanguageExtensions.html-23include-2Dfile-2Dchecking-2Dmacros&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=OBReYKDPkf2rIiHX9dCaocBlBS1aWqjyHfv96KXGjfE&s=yjq9jFWbl69Ob-COO8Wa4Pjq1ERvEIh_s0BHGssfbr0&e=">http://clang.llvm.org/docs/LanguageExtensions.html#include-file-checking-macros</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Given that I have identified that libc++ is being used, will this work ? :<br>
<br>
#if __cplusplus >= 201402<br>
// Header file shared_mutex supported<br>
#endif<br>
<br>
or do I need to check something else ?<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div></div>