From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 71A4C3857830 for ; Fri, 1 Oct 2021 19:43:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 71A4C3857830 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 From: Jonathan Wakely 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-Type: multipart/mixed; boundary="YEbwmAQ/1MOD12PA" Content-Disposition: inline X-Spam-Status: No, score=-13.8 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=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2021 19:43:27 -0000 --YEbwmAQ/1MOD12PA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --YEbwmAQ/1MOD12PA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" 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) { --YEbwmAQ/1MOD12PA--