-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
};
int del_count = 0;
-struct Good
+struct Good
{
Good() = default;
Good(const Good&) = default;
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
#include <any>
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2020-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2020-2021 Free Software Foundation, Inc.
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// { dg-require-cstdint "" }
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
#include <any>
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
any x(5); // x holds int
VERIFY(any_cast<int>(x) == 5); // cast to value
any_cast<int&>(x) = 10; // cast to reference
- VERIFY(any_cast<int>(x) == 10);
+ VERIFY(any_cast<int>(x) == 10);
x = "Meow"; // x holds const char*
VERIFY(strcmp(any_cast<const char*>(x), "Meow") == 0);
x = string("Meow"); // x holds string
string s, s2("Jane");
- s = move(any_cast<string&>(x)); // move from any
+ s = move(any_cast<string&>(x)); // move from any
VERIFY(s == "Meow");
any_cast<string&>(x) = move(s2); // move to any
VERIFY(any_cast<const string&>(x) == "Jane");
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17 -fno-rtti" }
+// { dg-options "-fno-rtti" }
// { dg-do run { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
#include <any>
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2020-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
#include <optional>
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2018-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2018-2021 Free Software Foundation, Inc.
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
#include <optional>
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
#include <optional>
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
#include <optional>
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2018-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2017-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2014-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
#include <tuple>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
#include <variant>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
#include <variant>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
#include <variant>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
#include <variant>
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2020-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2017-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// Copyright (C) 2017-2021 Free Software Foundation, Inc.
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
#include <variant>
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target { ilp32 || lp64 } } }
// { dg-require-effective-target c++17 }
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
#include <variant>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
#include <variant>
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
// Copyright (C) 2016-2021 Free Software Foundation, Inc.
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do run { target c++17 } }
#include <variant>