Run std::ios_base enum tests for C++11 and up
[gcc.git] / libstdc++-v3 / testsuite / 27_io / ios_base / types / fmtflags / case_label.cc
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");
 }