Skip to content

std::binary_function has been removed from C++17 & build fails on FreeBSD 14.1 #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jeffpc opened this issue Aug 14, 2024 · 1 comment

Comments

@jeffpc
Copy link
Contributor

jeffpc commented Aug 14, 2024

Compilation fails on FreeBSD 14.1 because comboaddress.hh uses std::binary_function which (according to [1]) has been deprecated in C++11 and removed from C++17. Clang 18.1.5 (the default compiler on FreeBSD 14.1) fails as a result. It looks like simplesocket already got a fix for that earlier this year (3af5e1d449128d0f3c), but the submodule pointers haven't been updated so galmon is still pulling in the commit without the fix.

[1] https://en.cppreference.com/w/cpp/utility/functional/binary_function

In file included from ubxtool.cc:34:
ext/powerblog/ext/simplesocket/comboaddress.hh:157:40: error: no template named 'binary_function' in namespace 'std'; did you mean '__binary_function'?
  157 |   struct addressOnlyEqual: public std::binary_function<ComboAddress, ComboAddress, bool>
      |                                   ~~~~~^~~~~~~~~~~~~~~
      |                                        __binary_function
/usr/include/c++/v1/__functional/binary_function.h:49:1: note: '__binary_function' declared here
   49 | using __binary_function = __binary_function_keep_layout_base<_Arg1, _Arg2, _Result>;
      | ^
@jeffpc
Copy link
Contributor Author

jeffpc commented Feb 17, 2025

This is still a problem. The solution turns out to be as easy as updating the ext/powerblog/ext/simplesocket submodule which has had the fix for over a year now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant