blob: 4594bec81a299ee11f68b9a1bd504ed3d35735cf [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001From f9b55f5a1fab85bf73c95e6372779d6f50f75e84 Mon Sep 17 00:00:00 2001
2From: jzmaddock <john@johnmaddock.co.uk>
3Date: Mon, 11 Jul 2022 18:26:07 +0100
4Subject: [PATCH] The std lib unary/binary_function base classes are
5 deprecated/removed from libcpp15. Fixes
6 https://github.com/boostorg/container_hash/issues/24.
7
8Upstream-Status: Backport [https://github.com/boostorg/config/pull/440/commits/f0af4a9184457939b89110795ae2d293582c5f66]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 src/third_party/boost-1.70.0/boost/config/stdlib/libcpp.hpp | 9 +++++++++
12 1 file changed, 9 insertions(+)
13
14--- a/src/third_party/boost-1.70.0/boost/config/stdlib/libcpp.hpp
15+++ b/src/third_party/boost-1.70.0/boost/config/stdlib/libcpp.hpp
16@@ -140,4 +140,13 @@
17 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX
18 #endif
19
20+#if _LIBCPP_VERSION >= 15000
21+//
22+// Unary function is now deprecated in C++11 and later:
23+//
24+#if __cplusplus >= 201103L
25+#define BOOST_NO_CXX98_FUNCTION_BASE
26+#endif
27+#endif
28+
29 // --- end ---
30--- a/src/third_party/boost-1.70.0/boost/container_hash/hash.hpp
31+++ b/src/third_party/boost-1.70.0/boost/container_hash/hash.hpp
32@@ -118,7 +118,7 @@ namespace boost
33 {
34 namespace hash_detail
35 {
36-#if defined(_HAS_AUTO_PTR_ETC) && !_HAS_AUTO_PTR_ETC
37+#if defined(BOOST_NO_CXX98_FUNCTION_BASE)
38 template <typename T>
39 struct hash_base
40 {