[LLVMdev] C++14 support for shared_mutex

Stefanus Du Toit sdt at google.com
Mon Jun 8 21:15:11 PDT 2015


On Mon, 8 Jun 2015 at 20:57 Edward Diener <eldlistmailingz at tropicsoft.com>
wrote:

> How can I tell at compile time through predefined macros whether libc++
> includes/supports the C++14 header file shared_mutex ?
>

If you just want to see whether the header exists, and are using Clang or
GCC 5, you can use __has_include:

http://clang.llvm.org/docs/LanguageExtensions.html#include-file-checking-macros


> Given that I have identified that libc++ is being used, will this work ? :
>
> #if __cplusplus >= 201402
> // Header file shared_mutex supported
> #endif
>
> or do I need to check something else ?
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150609/818e34a8/attachment.html>


More information about the llvm-dev mailing list