Support for C++14 shared_mutex in libstdc++

Jonathan Wakely jwakely.gcc@gmail.com
Tue Jun 9 08:36:00 GMT 2015


On 9 June 2015 at 04:49, Edward Diener wrote:
> I am looking for a way to check for C++14 support for the shared_mutex
> header in libstdc++ using preprocessor predefined macros. Is there a way to
> do this ? Does checking for some value of __cplusplus >= 201402 do this or
> is there some other check or further check which I must do ?

To check for the header use #if __has_include(shared_mutex)

To check whether std::shared_timed_mutex is defined by that header
include it and test #if __cpp_lib_shared_timed_mutex >= 201402L



More information about the Gcc-help mailing list