-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
+// { dg-require-effective-target hosted }
-// Copyright (C) 2009-2013 Free Software Foundation, Inc.
+// Copyright (C) 2009-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
void test01()
{
- bool test __attribute__((unused)) = true;
-
typedef std::function<int()> function;
function fo(f1);
fo2 = (std::move(fo));
VERIFY( static_cast<bool>(fo2) );
VERIFY( fo2() == 2 );
+
+ static_assert(std::is_nothrow_move_assignable<function>::value,
+ "PR libstdc++/81017");
}
int main()
{
test01();
-
- return 0;
}