blob: 7581efc76326f10a26bcf7ae529d2199478295d1 [file] [log] [blame]
Andrew Geissler8f840682023-07-21 09:09:43 -05001From a784973e500753747992a51dc0fb1caabbbb03be Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 6 Jul 2023 17:52:38 -0700
4Subject: [PATCH 2/2] Fix build with clang 17
5
6Part of https://github.com/jarro2783/cxxopts/commit/513afbc6dcfe2952cb2ffab0dae2415b11bba2d0
7
8Upstream-Status: Backport [https://github.com/jarro2783/cxxopts/commit/513afbc6dcfe2952cb2ffab0dae2415b11bba2d0]
9Signed-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
14diff --git a/thirdparty/cxxopts/include/cxxopts.hpp b/thirdparty/cxxopts/include/cxxopts.hpp
15index 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--
362.41.0
37