When did Clang provide C++11 mutex?

I'm having trouble determining feature availability at compile time.
We don't use Autotools and friends; rather, we use the preprocessor.

I've been through the release notes from 2.8 through 3.5 (form: ), and
I can't find mention of mutex.

I've also been to the latest docs, and I can't find a
__has_feature(cxx_mutex) or similar
(http://clang.llvm.org/docs/LanguageExtensions.html).

Finally, I visited http://clang.llvm.org/cxx_status.htmlbut there is
no topic or item for mutex. There is a statement "Clang 3.3 and later
implement all of the ISO C++ 2011 standard", so I guess that's the
version I should use in the absence of better information.

When did Clang provide C++11 mutex?

Thanks in advance.

Hi Jeffrey,

I'm having trouble determining feature availability at compile time.
We don't use Autotools and friends; rather, we use the preprocessor.

I've been through the release notes from 2.8 through 3.5 (form: ), and
I can't find mention of mutex.

I've also been to the latest docs, and I can't find a
__has_feature(cxx_mutex) or similar
(http://clang.llvm.org/docs/LanguageExtensions.html).

Finally, I visited http://clang.llvm.org/cxx_status.htmlbut there is
no topic or item for mutex. There is a statement "Clang 3.3 and later
implement all of the ISO C++ 2011 standard", so I guess that's the
version I should use in the absence of better information.

std::mutex is not a feature of the compiler (clang). It is a feature
of the C++ Standard Library (libcxx).

You should look for the <mutex> header. If the following compiles,
then mutex should be available:

#include <mutex>
std::mutex m;

Csaba

I'm having trouble determining feature availability at compile time.
We don't use Autotools and friends; rather, we use the preprocessor.

I've been through the release notes from 2.8 through 3.5 (form: ), and
I can't find mention of mutex.

Whoops... here was the form:
http://llvm.org/releases/3.7.0/docs/ReleaseNotes.html.

I've also been to the latest docs, and I can't find a
__has_feature(cxx_mutex) or similar
(http://clang.llvm.org/docs/LanguageExtensions.html).

Finally, I visited http://clang.llvm.org/cxx_status.htmlbut there is
no topic or item for mutex. There is a statement "Clang 3.3 and later
implement all of the ISO C++ 2011 standard", so I guess that's the
version I should use in the absence of better information.

std::mutex is not a feature of the compiler (clang). It is a feature
of the C++ Standard Library (libcxx).

You should look for the <mutex> header. If the following compiles,
then mutex should be available:

Oh, that's a good point; thanks. That should work for both LLVM Clang
and Apple Clang (mostly same tool; different versioning schemes).

Jeff