boostorg / container_hash

Generic hash function for STL style unordered containers
https://boost.org/libs/container_hash
29 stars 39 forks source link

unary_function has been removed from libc++ #24

Closed davidstone closed 1 year ago

davidstone commented 1 year ago

https://github.com/boostorg/container_hash/issues/22 talks about a similar issue with gcc warning about a deprecated use. Trunk libc++ has removed this function for the 15.0 release in C++17 and newer, so now I am getting an error:

/usr/include/boost/container_hash/hash.hpp:132:33: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
        struct hash_base : std::unary_function<T, std::size_t> {};
                           ~~~~~^
/home/david/llvm/build/bin/../include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^

See https://github.com/llvm/llvm-project/blob/main/libcxx/docs/ReleaseNotes.rst

pdimov commented 1 year ago

Sounds like the Config change needs to be applied for libc++ as well. (cc @jzmaddock)