Skip to content

Commit c152539

Browse files
authored
(#16930) boost: add official patches
* boost: apply upstream patches to 1.80.0 * boost: address review comments
1 parent 1333cb2 commit c152539

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

recipes/boost/all/conandata.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ patches:
8888
patch_description: "On POSIX systems that don't support *at APIs, compilation fails due to a missing include"
8989
patch_type: "official"
9090
patch_source: "https://github.com/boostorg/filesystem/issues/250"
91+
- patch_file: "patches/1.80.0-0005-config-libcpp15.patch"
92+
patch_description: "Support for libcpp15 which removes std::unary_function and std::binary_function."
93+
patch_type: "portability"
94+
patch_source: "https://www.boost.org/patches/1_80_0/0005-config-libcpp15.patch"
95+
- patch_file: "patches/1.80.0-0006-unordered-msvc-rtcc.patch"
96+
patch_description: "Fix MSVC /RTCc build runtime failures."
97+
patch_type: "official"
98+
patch_source: "https://www.boost.org/patches/1_80_0/0006-unordered-msvc-rtcc.patch"
9199
"1.79.0":
92100
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
93101
patch_description: "Fails the build when there is no iconv backend"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- a/boost/config/stdlib/libcpp.hpp 2022-08-03 22:47:07.000000000 -0400
2+
+++ b/boost/config/stdlib/libcpp.hpp 2022-09-16 22:16:17.044119011 -0400
3+
@@ -168,4 +168,13 @@
4+
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
5+
#endif
6+
7+
+#if _LIBCPP_VERSION >= 15000
8+
+//
9+
+// Unary function is now deprecated in C++11 and later:
10+
+//
11+
+#if __cplusplus >= 201103L
12+
+#define BOOST_NO_CXX98_FUNCTION_BASE
13+
+#endif
14+
+#endif
15+
+
16+
// --- end ---
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--- a/boost/unordered/detail/prime_fmod.hpp 2022-08-03 22:47:16.000000000 -0400
2+
+++ b/boost/unordered/detail/prime_fmod.hpp 2022-12-14 01:45:27.368620146 -0500
3+
@@ -117,9 +117,15 @@
4+
#if defined(BOOST_UNORDERED_FCA_HAS_64B_SIZE_T)
5+
std::size_t sizes_under_32bit = inv_sizes32_len;
6+
if (BOOST_LIKELY(size_index < sizes_under_32bit)) {
7+
+#if defined(__MSVC_RUNTIME_CHECKS)
8+
+ return fast_modulo(
9+
+ boost::uint32_t(hash & 0xffffffffu) + boost::uint32_t(hash >> 32),
10+
+ inv_sizes32[size_index], boost::uint32_t(sizes[size_index]));
11+
+#else
12+
return fast_modulo(
13+
boost::uint32_t(hash) + boost::uint32_t(hash >> 32),
14+
inv_sizes32[size_index], boost::uint32_t(sizes[size_index]));
15+
+#endif
16+
} else {
17+
return positions[size_index - sizes_under_32bit](hash);
18+
}

0 commit comments

Comments
 (0)