summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/boost/system-non-virtual-dtor-include.patch
blob: bba19643907cc0433d7f25e3761cd1f6508146fd (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
From af1dc841609c980cd76f8e3c5db486d69073214b Mon Sep 17 00:00:00 2001
From: Peter Dimov <pdimov@gmail.com>
Date: Mon, 4 Mar 2019 16:35:35 +0200
Subject: [PATCH] Disable -Wnon-virtual-dtor

---
 include/boost/system/error_code.hpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp
index 93899df..b9c590d 100644
--- a/include/boost/system/error_code.hpp
+++ b/include/boost/system/error_code.hpp
@@ -155,6 +155,10 @@ template<> struct is_error_condition_enum<errc::errc_t>
 };
 
 // class error_category
+#if defined( BOOST_GCC ) || defined( BOOST_CLANG )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+#endif
 
 #ifdef BOOST_MSVC
 #pragma warning( push )
@@ -314,6 +318,10 @@ public:
 
 } // namespace detail
 
+#if defined( BOOST_GCC ) || defined( BOOST_CLANG )
+#pragma GCC diagnostic pop
+#endif
+
 // generic_category(), system_category()
 
 #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
-- 
2.20.1


From c705bab504dafdc8925b30709e1ef8f83c62b9af Mon Sep 17 00:00:00 2001
From: Peter Dimov <pdimov@gmail.com>
Date: Mon, 4 Mar 2019 17:38:52 +0200
Subject: [PATCH] #pragma GCC diagnostic push/pop requires gcc 4.6

---
 include/boost/system/error_code.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp
index b9c590d..f1d7ddb 100644
--- a/include/boost/system/error_code.hpp
+++ b/include/boost/system/error_code.hpp
@@ -155,7 +155,7 @@ template<> struct is_error_condition_enum<errc::errc_t>
 };
 
 // class error_category
-#if defined( BOOST_GCC ) || defined( BOOST_CLANG )
+#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
 #endif
@@ -318,7 +318,7 @@ public:
 
 } // namespace detail
 
-#if defined( BOOST_GCC ) || defined( BOOST_CLANG )
+#if ( defined( BOOST_GCC ) && BOOST_GCC >= 40600 ) || defined( BOOST_CLANG )
 #pragma GCC diagnostic pop
 #endif
 
-- 
2.20.1