OSDN Git Service

2008-10-10 Paolo Carlini <paolo.carlini@oracle.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / testsuite / 30_threads / unique_lock / locking / 2.cc
index 96ab25e..2a3aa17 100644 (file)
@@ -51,9 +51,10 @@ void test01()
         {
           l.lock();
         }
-      catch (std::system_error const& ex)
+      catch (const std::system_error& ex)
         {
-         VERIFY( ex.code() == std::posix_error::operation_not_permitted );
+         VERIFY( ex.code() == std::error_code(
+                   std::posix_error::operation_not_permitted) );
         }
       catch (...)
         {
@@ -89,7 +90,8 @@ void test02()
        }
       catch (const std::system_error& ex)
        {
-         VERIFY( ex.code() == std::posix_error::resource_deadlock_would_occur );
+         VERIFY( ex.code() == std::error_code(
+                   std::posix_error::resource_deadlock_would_occur) );
        }
       catch (...)
        {