Files
openwrt-armor-g5/tools/gengetopt/patches/002-gm_utils.h-Drop-std-unary_function.patch
domenico 27c9d80f51
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Initial commit
2025-06-24 12:51:15 +02:00

34 lines
1.3 KiB
Diff

From a3d0a0419a35bef9b80a6a12432ab30e2d1e0f5a Mon Sep 17 00:00:00 2001
From: Tomas Volf <~@wolfsden.cz>
Date: Tue, 5 Mar 2024 22:27:42 +0100
Subject: [PATCH] gm_utils.h: Drop std::unary_function.
I am not sure what it does, it is deprecated/removed (depending on C++ version)
and the advice seems to be that is just is not necessary. So just remove it.
* src/gm_utils.h (print_f, pair_print_f): Drop std::unary_function.
---
src/gm_utils.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/src/gm_utils.h
+++ b/src/gm_utils.h
@@ -117,7 +117,7 @@ bool string_contains(const char *s, cons
* Function object to print something into a stream (to be used with for_each)
*/
template<class T>
-struct print_f : public std::unary_function<T, void>
+struct print_f
{
print_f(std::ostream& out, const string &s = ", ") : os(out), sep(s) {}
void operator() (T x) { os << x << sep; }
@@ -129,7 +129,7 @@ struct print_f : public std::unary_funct
* Function object to print a pair into two streams (to be used with for_each)
*/
template<class T>
-struct pair_print_f : public std::unary_function<T, void>
+struct pair_print_f
{
pair_print_f(std::ostream& out1, std::ostream& out2, const string &s = ", ") :
os1(out1), os2(out2), sep(s) {}