diff --git a/configure.ac b/configure.ac index 682923096d00e..0e1968f5c47e1 100644 --- a/configure.ac +++ b/configure.ac @@ -1461,6 +1461,11 @@ if test "$use_boost" = "yes"; then dnl we don't use multi_index serialization BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION" + dnl Prevent use of std::unary_function, which was removed in C++17, + dnl and will generate warnings with newer compilers. + dnl See: https://github.com/boostorg/container_hash/issues/22. + BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE" + if test "$enable_debug" = "yes" || test "$enable_fuzz" = "yes"; then BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE" fi