mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-04 01:37:34 -08:00
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>
22 lines
752 B
Diff
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) {}
|