llvm-project/libcxx/test/std/thread
Eric Fiselier 8551d0e319 Fix compile error with Bionic's PTHREAD_MUTEX_INITIALIZER
On Bionic PTHREAD_MUTEX_INITIALIZER contains the expression "<enum-type> & <integer-type>",
which causes ADL to perform name lookup for operator&. During this lookup Clang decides
that it requires the default member initializer for std::mutex while defining the DMI
for std::mutex::__m_.

If I'm not mistaken this is caused by the explicit noexcept declaration on the defaulted
constructor.

This patch removes the explicit noexcept and instead allows the compiler to declare
the default constructor implicitly noexcept. It also adds a static_assert to ensure
that happens.

Unfortunatly because it's not easy to change the value of _LIBCPP_MUTEX_INITIALIZER
for a single test there is no good way to test this patch.

The Clang behavior causing the trouble here was introduced in r287713, which first
appears in the 4.0 release.

llvm-svn: 304942
2017-06-07 20:47:42 +00:00
..
futures Add markup for libc++ dylib availability 2017-05-04 17:08:54 +00:00
thread.condition Move POSIX specific test under test/libcxx subdirectory 2017-05-12 02:02:09 +00:00
thread.general
thread.mutex Fix compile error with Bionic's PTHREAD_MUTEX_INITIALIZER 2017-06-07 20:47:42 +00:00
thread.req
thread.threads Fix or move tests with non-standard assumptions 2017-05-12 01:44:51 +00:00
macro.pass.cpp