Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 1 | From a784973e500753747992a51dc0fb1caabbbb03be Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 6 Jul 2023 17:52:38 -0700 |
| 4 | Subject: [PATCH 2/2] Fix build with clang 17 |
| 5 | |
| 6 | Part of https://github.com/jarro2783/cxxopts/commit/513afbc6dcfe2952cb2ffab0dae2415b11bba2d0 |
| 7 | |
| 8 | Upstream-Status: Backport [https://github.com/jarro2783/cxxopts/commit/513afbc6dcfe2952cb2ffab0dae2415b11bba2d0] |
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 10 | --- |
| 11 | thirdparty/cxxopts/include/cxxopts.hpp | 4 ++-- |
| 12 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 13 | |
| 14 | diff --git a/thirdparty/cxxopts/include/cxxopts.hpp b/thirdparty/cxxopts/include/cxxopts.hpp |
| 15 | index e87416f1..bd2d81cf 100644 |
| 16 | --- a/thirdparty/cxxopts/include/cxxopts.hpp |
| 17 | +++ b/thirdparty/cxxopts/include/cxxopts.hpp |
| 18 | @@ -468,14 +468,14 @@ namespace cxxopts |
| 19 | { |
| 20 | if (negative) |
| 21 | { |
| 22 | - if (u > static_cast<U>(-std::numeric_limits<T>::min())) |
| 23 | + if (u > static_cast<U>((std::numeric_limits<T>::min)())) |
| 24 | { |
| 25 | throw argument_incorrect_type(text); |
| 26 | } |
| 27 | } |
| 28 | else |
| 29 | { |
| 30 | - if (u > static_cast<U>(std::numeric_limits<T>::max())) |
| 31 | + if (u > static_cast<U>((std::numeric_limits<T>::max)())) |
| 32 | { |
| 33 | throw argument_incorrect_type(text); |
| 34 | } |
| 35 | -- |
| 36 | 2.41.0 |
| 37 | |