]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/20_util/any/modifiers/1.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / any / modifiers / 1.cc
index 36b9c247843fc7ef22261790fae8e641854172e2..66844b9a217261349dc2281b8ad07e7df5a9e0fc 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-options "-std=gnu++17" }
-// { dg-do run }
+// { dg-do run { target c++17 } }
 
-// Copyright (C) 2014-2016 Free Software Foundation, Inc.
+// Copyright (C) 2014-2024 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -28,14 +27,14 @@ void test01()
   any x(1);
   any y;
   x.swap(y);
-  VERIFY( x.empty() );
-  VERIFY( !y.empty() );
+  VERIFY( !x.has_value() );
+  VERIFY( y.has_value() );
   x.swap(y);
-  VERIFY( !x.empty() );
-  VERIFY( y.empty() );
+  VERIFY( x.has_value() );
+  VERIFY( !y.has_value() );
 
-  x.clear();
-  VERIFY( x.empty() );
+  x.reset();
+  VERIFY( !x.has_value() );
 }
 
 int main()