std::thread does not care if a function object is adaptable, so there is
no need to derive from the deprecated std::unary_function class in these
tests.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* testsuite/30_threads/thread/cons/3.cc: Remove derivation from
std::unary_function.
* testsuite/30_threads/thread/cons/4.cc: Likewise.
* testsuite/30_threads/thread/cons/5.cc: Likewise.
// <http://www.gnu.org/licenses/>.
-#include <functional> // std::unary_function, std::ref
+#include <functional> // std::ref
#include <thread>
#include <system_error>
#include <testsuite_hooks.h>
-struct copyable : public std::unary_function<std::thread::id&, void>
+struct copyable
{
copyable() = default;
~copyable() = default;
int main()
{
test03();
- return 0;
}
// <http://www.gnu.org/licenses/>.
-#include <functional> // std::unary_function, std::ref, std::cref
+#include <functional> // std::ref, std::cref
#include <thread>
#include <system_error>
#include <testsuite_hooks.h>
-struct noncopyable : std::unary_function<std::thread::id&, void>
+struct noncopyable
{
noncopyable() = default;
~noncopyable() = default;
// <http://www.gnu.org/licenses/>.
-#include <functional> // std::unary_function, std::ref
+#include <functional> // std::ref
#include <thread>
#include <system_error>
#include <testsuite_hooks.h>
-struct nonconst : public std::unary_function<std::thread::id&, void>
+struct nonconst
{
void operator()(std::thread::id& id)
{