-// { 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
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()