[Bug libstdc++/95545] thread:: conflicts with std::thread

2020-06-04 Thread redi at gcc dot gnu.org
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.

[Bug libstdc++/95545] thread:: conflicts with std::thread

2020-06-04 Thread redi at gcc dot gnu.org
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.

[Bug libstdc++/95545] thread:: conflicts with std::thread

2020-06-04 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95545 David Edelsohn changed: What|Removed |Added Resolution|--- |WONTFIX Status|NEW

[Bug libstdc++/95545] thread:: conflicts with std::thread

2020-06-04 Thread dje at gcc dot gnu.org
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

[Bug libstdc++/95545] thread:: conflicts with std::thread

2020-06-04 Thread redi at gcc dot gnu.org
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++

[Bug libstdc++/95545] thread:: conflicts with std::thread

2020-06-04 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95545 David Edelsohn changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0