https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95545
--- Comment #6 from Jonathan Wakely ---
See
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rs-using
in the C++ Core Guidelines.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95545
--- Comment #5 from Jonathan Wakely ---
The problem is that 'using namespace std;' introduces an ambiguity. That is in
the user's code, there's nothing we can do in libstdc++ to avoid it.
We could add a different name for std::thread eg.
namesp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95545
David Edelsohn changed:
What|Removed |Added
Resolution|--- |WONTFIX
Status|NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95545
--- Comment #3 from David Edelsohn ---
#include
#include
using namespace std;
int main(void)
{
int maxThreads = thread::hardware_concurrency();
printf("maxThreads: %d\n", maxThreads);
return(0);
}
$ g++ -pthread /tmp/n
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95545
--- Comment #2 from Jonathan Wakely ---
(In reply to David Edelsohn from comment #0)
> which creates an ambiguity when a user references thread:: without
> std::thread.
Could you show an example of code that's ambiguous?
> Would libstdc++ consi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95545
David Edelsohn changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Ever confirmed|0