aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-apply-msvc-workaround-for-clang-16.patch
blob: 096269308d24f43cbe6185827d2444d06055eefc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 03047c81b2601362bcf79cae67e06d1fba0a6101 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 2 Mar 2023 20:17:57 -0800
Subject: [PATCH] apply msvc workaround for clang >= 16

This avoids a new Werror found with clang16

boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
    typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp
index 6bc05f7e96e..6bb8d24c9ce 100644
--- a/src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp
+++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp
@@ -56,7 +56,7 @@ struct AUX_WRAPPER_NAME
 // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC),
 // while some other don't like 'value + 1' (Borland), and some don't like
 // either
-#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
+#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) || __clang_major__ > 15
  private:
     BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)));
     BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)));
-- 
2.39.2