gentoo/dev-util/gengetopt/files/gengetopt-2.23.1-fix-c17.patch
Nicolas PARLANT 23f6f7cf59
dev-util/gengetopt: del unary_function fix c17
unary_function removed in C++17. It can just be deleted.
no revbump

Closes: https://bugs.gentoo.org/913636
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Closes: https://github.com/gentoo/gentoo/pull/40729
Signed-off-by: Sam James <sam@gentoo.org>
2025-03-10 03:00:39 +00:00

22 lines
752 B
Diff

unary_function removed in C++17. It can just be deleted.
--- a/src/gm_utils.h
+++ b/src/gm_utils.h
@@ -117,7 +117,7 @@
* 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 @@
* 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) {}