Skip to content
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

boost 1.83.0: fix windows without NOMINMAX #22240

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions recipes/boost/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ patches:
- patch_file: "patches/1.82.0-locale-iconv-library-option.patch"
patch_description: "Optional flag to specify iconv from either libc of libiconv"
patch_type: "conan"
- patch_file: "patches/1.83.0-locale-msvc.patch"
patch_description: "Fix compilation on windows when NOMINMAX is not defined"
patch_type: "official"
patch_source: "https://github.com/boostorg/locale/pull/189"
"1.82.0":
- patch_file: "patches/1.82.0-locale-iconv-library-option.patch"
patch_description: "Optional flag to specify iconv from either libc of libiconv"
Expand Down
22 changes: 22 additions & 0 deletions recipes/boost/all/patches/1.83.0-locale-msvc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 0552ffc29ff11e4fe130b7143ea6ac2bee7b15c6 Mon Sep 17 00:00:00 2001
From: wevsty <ty@wevs.org>
Date: Sat, 12 Aug 2023 22:13:48 +0800
Subject: [PATCH] fix build error on MSVC

---
boost/locale/util/string.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boost/locale/util/string.hpp b/boost/locale/util/string.hpp
index 9ab9521c..ba066bd4 100644
--- a/boost/locale/util/string.hpp
+++ b/boost/locale/util/string.hpp
@@ -38,7 +38,7 @@ namespace boost { namespace locale { namespace util {
/// Cast an unsigned char to a (possibly signed) char avoiding implementation defined behavior
constexpr char to_char(unsigned char c)
{
- return static_cast<char>((c - std::numeric_limits<char>::min()) + std::numeric_limits<char>::min());
+ return static_cast<char>((c - (std::numeric_limits<char>::min)()) + (std::numeric_limits<char>::min)());
}

}}} // namespace boost::locale::util