http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52681

             Bug #: 52681
           Summary: [C++11] Using std::thread without -pthread crashes
                    without warning
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libstdc++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: mkl...@cs.wisc.edu


Without -pthread, the constructor of std::thread always throws
std::system_error. While this was apparently the resolution to bug 42198,
simply throwing an error with the code 'operation_not_permitted' is rather
mystifying to someone who isn't aware of the problem in the first place.

Would it be possible to offer a more descriptive error, preferably at compile
time?

Reply via email to