summaryrefslogtreecommitdiff
path: root/dev-cpp/libcutl/files/libcutl-1.10.0-fix-c++14.patch
blob: a6f1a505485bf03125f0eac5ea37180cc859f2ac (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Make dtors noexcept(false) when compiling in C++11 and above. This avoids silent
breakage due to the semantic exception changes between C++98 and C++11.

--- a/cutl/fs/auto-remove.cxx
+++ b/cutl/fs/auto-remove.cxx
@@ -13,6 +13,9 @@
   {
     auto_remove::
     ~auto_remove ()
+#if __cplusplus >= 201103L
+    noexcept(false)
+#endif
     {
       if (!canceled_)
       {
@@ -23,6 +26,9 @@
 
     auto_removes::
     ~auto_removes ()
+#if __cplusplus >= 201103L
+    noexcept(false)
+#endif
     {
       if (!canceled_)
       {
--- a/cutl/fs/auto-remove.hxx
+++ b/cutl/fs/auto-remove.hxx
@@ -26,7 +26,11 @@
       {
       }
 
-      ~auto_remove ();
+      ~auto_remove ()
+#if __cplusplus >= 201103L
+      noexcept(false)
+#endif
+      ;
 
       void
       cancel ()
@@ -51,7 +55,11 @@
     struct LIBCUTL_EXPORT auto_removes
     {
       auto_removes (): canceled_ (false) {}
-      ~auto_removes ();
+      ~auto_removes ()
+#if __cplusplus >= 201103L
+      noexcept(false)
+#endif
+      ;
 
       void
       add (path const& p)