mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-12 21:33:54 +08:00
libstdc++: Fix failing tests for AIX
These two tests fail on AIX because <sys/thread.h> defines struct thread in the global namespace (despite it not being a reserved name). That means the using-declaration that adds it to the global namespace causes a redeclaration error. libstdc++-v3/ChangeLog: * testsuite/30_threads/thread/cons/84535.cc: Use a custom namespace. * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
This commit is contained in:
parent
18095be170
commit
fe8d7fec4d
@ -20,6 +20,8 @@
|
||||
|
||||
#include <thread>
|
||||
|
||||
namespace __gnu_test
|
||||
{
|
||||
using std::is_constructible;
|
||||
using std::thread;
|
||||
|
||||
@ -28,3 +30,4 @@ static_assert(!is_constructible<thread, thread, int>::value, "");
|
||||
static_assert(!is_constructible<thread, thread&, int>::value, "");
|
||||
static_assert(!is_constructible<thread, const thread&, int>::value, "");
|
||||
static_assert(!is_constructible<thread, const thread&&, int>::value, "");
|
||||
}
|
||||
|
@ -20,9 +20,12 @@
|
||||
|
||||
#include <thread>
|
||||
|
||||
namespace __gnu_test
|
||||
{
|
||||
using std::thread;
|
||||
using std::is_constructible;
|
||||
|
||||
static_assert( !is_constructible<thread, thread&>::value, "" );
|
||||
static_assert( !is_constructible<thread, const thread&>::value, "" );
|
||||
static_assert( !is_constructible<thread, const thread>::value, "" );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user