From patchwork Fri Oct 1 19:43:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1535527 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=xIuy6lj5; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HLh6h3VQZz9t25 for ; Sat, 2 Oct 2021 06:10:02 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F1C993857416 for ; Fri, 1 Oct 2021 20:09:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1C993857416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1633119000; bh=746S7Pnk2HM14XOVFvuFUzjUO/K9AKGdlnVR1xNU9l4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=xIuy6lj5baRYi/AIpDk2DkT78PcidZVGQbdtmskHhIaD+lh+8Xauqftk7iP6kPs/l 18ORjd1i3Q2giIh8alpdk+TixeWcnEuN79lAlHc4N5MfW3IbARvuu6TrYDXx1cREes tDD2LJutwkfeP5Ut34Gsqd6NcCZyQUwGFvWfAk0A= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 716A7385782D for ; Fri, 1 Oct 2021 19:43:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 716A7385782D Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-505-hpbWh5NYPzGS0cElbThAvw-1; Fri, 01 Oct 2021 15:43:24 -0400 X-MC-Unique: hpbWh5NYPzGS0cElbThAvw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6A38D8010ED; Fri, 1 Oct 2021 19:43:20 +0000 (UTC) Received: from localhost (unknown [10.33.36.47]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1A2344F0B8; Fri, 1 Oct 2021 19:43:19 +0000 (UTC) Date: Fri, 1 Oct 2021 20:43:19 +0100 To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Remove unary_function base classes from std::thread tests Message-ID: MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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 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. Tested powerpc64le-linux. Committed to trunk. commit 9b790acc2207d69b4ebc0f4addd34a0aa32ec6cf Author: Jonathan Wakely Date: Mon May 24 18:32:22 2021 libstdc++: Remove unary_function base classes from std::thread tests 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 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. diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc index efdc631d950..6677156b7f2 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc @@ -21,12 +21,12 @@ // . -#include // std::unary_function, std::ref +#include // std::ref #include #include #include -struct copyable : public std::unary_function +struct copyable { copyable() = default; ~copyable() = default; @@ -84,5 +84,4 @@ void test03() int main() { test03(); - return 0; } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc index d74ad9715e3..9508cb45a1b 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc @@ -21,12 +21,12 @@ // . -#include // std::unary_function, std::ref, std::cref +#include // std::ref, std::cref #include #include #include -struct noncopyable : std::unary_function +struct noncopyable { noncopyable() = default; ~noncopyable() = default; diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc index 74dcd84c058..6d4d6854b30 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc @@ -21,12 +21,12 @@ // . -#include // std::unary_function, std::ref +#include // std::ref #include #include #include -struct nonconst : public std::unary_function +struct nonconst { void operator()(std::thread::id& id) {