From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id C86E23857821; Fri, 1 Oct 2021 19:39:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C86E23857821 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-4075] libstdc++: Remove unary_function base classes from std::thread tests X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: e3869a48fc2e5fbb9e8eb7058e5176446479673f X-Git-Newrev: 9b790acc2207d69b4ebc0f4addd34a0aa32ec6cf Message-Id: <20211001193930.C86E23857821@sourceware.org> Date: Fri, 1 Oct 2021 19:39:30 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2021 19:39:30 -0000 https://gcc.gnu.org/g:9b790acc2207d69b4ebc0f4addd34a0aa32ec6cf commit r12-4075-g9b790acc2207d69b4ebc0f4addd34a0aa32ec6cf Author: Jonathan Wakely Date: Mon May 24 18:32:22 2021 +0100 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: --- libstdc++-v3/testsuite/30_threads/thread/cons/3.cc | 5 ++--- libstdc++-v3/testsuite/30_threads/thread/cons/4.cc | 4 ++-- libstdc++-v3/testsuite/30_threads/thread/cons/5.cc | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) 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) {