aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-05-24 18:32:22 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-10-01 20:36:54 +0100
commit9b790acc2207d69b4ebc0f4addd34a0aa32ec6cf (patch)
tree1f1395b96112eeafb2a81bb49d724f1bafe417de
parente3869a48fc2e5fbb9e8eb7058e5176446479673f (diff)
downloadgcc-9b790acc2207d69b4ebc0f4addd34a0aa32ec6cf.zip
gcc-9b790acc2207d69b4ebc0f4addd34a0aa32ec6cf.tar.gz
gcc-9b790acc2207d69b4ebc0f4addd34a0aa32ec6cf.tar.bz2
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.
-rw-r--r--libstdc++-v3/testsuite/30_threads/thread/cons/3.cc5
-rw-r--r--libstdc++-v3/testsuite/30_threads/thread/cons/4.cc4
-rw-r--r--libstdc++-v3/testsuite/30_threads/thread/cons/5.cc4
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 efdc631..6677156 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 d74ad97..9508cb4 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 74dcd84..6d4d685 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)
{