Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 887658 Details for
Bug 914349
media-libs/audiofile-0.3.6-r5 fails to compile with clang: SimpleModule.h:128:40: error: no template named 'unary_function' in namespace 'std'
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
resolves the Clang deprecation errors
audiofile-0.3.6-r5.patch (text/plain), 1.96 KB, created by
Domini Montessori
on 2024-03-15 06:33:02 UTC
(
hide
)
Description:
resolves the Clang deprecation errors
Filename:
MIME Type:
Creator:
Domini Montessori
Created:
2024-03-15 06:33:02 UTC
Size:
1.96 KB
patch
obsolete
>diff --git a/libaudiofile/modules/SimpleModule.h b/libaudiofile/modules/SimpleModule.h >index 03c6c69..a3c3eac 100644 >--- a/libaudiofile/modules/SimpleModule.h >+++ b/libaudiofile/modules/SimpleModule.h >@@ -125,13 +125,17 @@ struct signConverter > static const int kScaleBits = (Format + 1) * CHAR_BIT - 1; > static const int kMinSignedValue = -1 << kScaleBits; > >- struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType> >+ struct signedToUnsigned > { >+ typedef SignedType argument_type; >+ typedef UnsignedType result_type; > UnsignedType operator()(SignedType x) { return x - kMinSignedValue; } > }; > >- struct unsignedToSigned : public std::unary_function<SignedType, UnsignedType> >+ struct unsignedToSigned > { >+ typedef SignedType argument_type; >+ typedef UnsignedType result_type; > SignedType operator()(UnsignedType x) { return x + kMinSignedValue; } > }; > }; >@@ -323,8 +327,10 @@ private: > }; > > template <typename Arg, typename Result> >-struct intToFloat : public std::unary_function<Arg, Result> >+struct intToFloat > { >+ typedef Arg argument_type; >+ typedef Result result_type; > Result operator()(Arg x) const { return x; } > }; > >@@ -389,14 +395,18 @@ private: > }; > > template <typename Arg, typename Result, unsigned shift> >-struct lshift : public std::unary_function<Arg, Result> >+struct lshift > { >+ typedef Arg argument_type; >+ typedef Result result_type; > Result operator()(const Arg &x) const { return x << shift; } > }; > > template <typename Arg, typename Result, unsigned shift> >-struct rshift : public std::unary_function<Arg, Result> >+struct rshift > { >+ typedef Arg argument_type; >+ typedef Result result_type; > Result operator()(const Arg &x) const { return x >> shift; } > }; > >@@ -491,8 +501,10 @@ private: > }; > > template <typename Arg, typename Result> >-struct floatToFloat : public std::unary_function<Arg, Result> >+struct floatToFloat > { >+ typedef Arg argument_type; >+ typedef Result result_type; > Result operator()(Arg x) const { return x; } > }; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 914349
:
870820
|
870821
| 887658