Run std::ios_base enum tests for C++11 and up
authorJonathan Wakely <jwakely@redhat.com>
Mon, 1 Aug 2016 12:17:43 +0000 (13:17 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 1 Aug 2016 12:17:43 +0000 (13:17 +0100)
* testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Make test
supported for C++11 and later.
* testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise.
* testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise.

From-SVN: r238939

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc
libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc
libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc

index 74e0e3e33472195e85e6553e544ec7caf2b4d95d..63ed47819b3c7c2a8f19a33d9be40ff81b4f3ef7 100644 (file)
@@ -1,3 +1,10 @@
+2016-08-01  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Make test
+       supported for C++11 and later.
+       * testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise.
+       * testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise.
+
 2016-08-01  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
index d786e103438f26603b5e60956366807400fa5dd0..c0e94877aaca901e1c90a1ef0904e96a874a8416 100644 (file)
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-Wall" { target *-*-* } }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall" }
 // -*- C++ -*-
  
 // Copyright (C) 2004-2016 Free Software Foundation, Inc.
@@ -75,6 +75,7 @@ case_labels(bitmask_type b)
     case ~__INT_MAX__:
       break;
     }
-  static_assert( sizeof(std::underlying_type_t<bitmask_type>) == sizeof(int),
+  using underlying_type = std::underlying_type<bitmask_type>::type;
+  static_assert( sizeof(underlying_type) == sizeof(int),
       "underlying type has same range of values as int");
 }
index 7d777b89c673125b2ae02cc865c36a441338bc78..5ca9f5f875958c63ba7cb14630ee1e628056ab7a 100644 (file)
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-Wall" { target *-*-* } }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall" }
 // -*- C++ -*-
  
 // Copyright (C) 2004-2016 Free Software Foundation, Inc.
@@ -47,6 +47,7 @@ case_labels(bitmask_type b)
     case ~__INT_MAX__:
       break;
     }
-  static_assert( sizeof(std::underlying_type_t<bitmask_type>) == sizeof(int),
+  using underlying_type = std::underlying_type<bitmask_type>::type;
+  static_assert( sizeof(underlying_type) == sizeof(int),
       "underlying type has same range of values as int");
 }
index bb9e96e260ca808a56644e6ad30b4a980f89e27a..14a4984105b54fa2d0557d4328b8981041d9f604 100644 (file)
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-Wall" { target *-*-* } }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall" }
 // -*- C++ -*-
  
 // Copyright (C) 2004-2016 Free Software Foundation, Inc.
@@ -51,6 +51,7 @@ case_labels(bitmask_type b)
     case ~__INT_MAX__:
       break;
     }
-  static_assert( sizeof(std::underlying_type_t<bitmask_type>) == sizeof(int),
+  using underlying_type = std::underlying_type<bitmask_type>::type;
+  static_assert( sizeof(underlying_type) == sizeof(int),
       "underlying type has same range of values as int");
 }