public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
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
Date: Fri,  1 Oct 2021 19:39:30 +0000 (GMT)	[thread overview]
Message-ID: <20211001193930.C86E23857821@sourceware.org> (raw)

https://gcc.gnu.org/g:9b790acc2207d69b4ebc0f4addd34a0aa32ec6cf

commit r12-4075-g9b790acc2207d69b4ebc0f4addd34a0aa32ec6cf
Author: Jonathan Wakely <jwakely@redhat.com>
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 <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.

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 @@
 // <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;
@@ -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 @@
 // <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;
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 @@
 // <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)
   {


                 reply	other threads:[~2021-10-01 19:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211001193930.C86E23857821@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).