http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51296
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-24 20:30:43 UTC --- What does this program do, compiled with -std=c++11 -pthread ? #include <mutex> #include <system_error> #include <assert.h> #define VERIFY assert int main() { typedef std::mutex mutex_type; typedef std::unique_lock<mutex_type> lock_type; try { mutex_type m; lock_type lock(m); VERIFY( lock.owns_lock() ); VERIFY( (bool)lock ); } catch (const std::system_error& e) { VERIFY( false ); } catch (...) { VERIFY( false ); } return 0; }