Closed ggardet closed 2 years ago
This is a legitimate issue. std::binary_function and std::unary_function were deprecated in C++11 and removed in C++17.
Since we're using C++14 the warning is correct. Tactical fix for your build could be to compile with "-Wno-deprecated-declarations".
Short-term fix in the code should be to declare result_type and first_argument_type typedefs in Minimum and Maximum (rather than using std::binary_function) and in Abs, Rsqrt, Sin, Sqrt, Exp, Log (instead of std::unary_function). That's how the standard library has solved the same issue. This will fix the code for C++14 (and is future-compatible to C++17).
If we ever move forward to compatibility with C++20 the way types are determined in the reference workloads will need to be re-written, and result_type and first_argument_type will get removed from the standard functors.
Patch up for review https://review.mlplatform.org/c/ml/armnn/+/7574
I don't have g++-12 easily available at the moment, so there could be other problems to fix.
@ggardet I hope this patch at least improves things.
@MatthewARM Yes, it improved things, but now, I have another (unrelated) error. See: https://github.com/ARM-software/armnn/issues/644
I am going to close this issue as it has been resolved. If you are still experiencing problems, please do not hesitate to reopen this ticket or create a new issue.
Kind Regards, Cathal.
Armnn 22.02 fails to build with GCC12 on openSUSE Tumbleweed: