aboutsummaryrefslogtreecommitdiff
path: root/ports/hpx/boost-1.69.patch
blob: f589ca795e9c6332ce836fa0b22a90b88650d105 (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
diff --git a/hpx/exception.hpp b/hpx/exception.hpp
index 0c818088c7b..3eeaa579131 100644
--- a/hpx/exception.hpp
+++ b/hpx/exception.hpp
@@ -50,6 +50,12 @@ namespace hpx
         /// Construct a hpx::exception from a boost#system_error.
         explicit exception(boost::system::system_error const& e);
 
+        /// Construct a hpx::exception from a boost#system#error_code (this is
+        /// new for Boost V1.69). This constructor is required to compensate
+        /// for the changes introduced as a resolution to LWG3162
+        /// (https://cplusplus.github.io/LWG/issue3162).
+        explicit exception(boost::system::error_code const& e);
+
         /// Construct a hpx::exception from a \a hpx::error and an error message.
         ///
         /// \param e      The parameter \p e holds the hpx::error code the new
diff --git a/src/exception.cpp b/src/exception.cpp
index 52c1cceba6b..cb6535fd008 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -89,6 +89,14 @@ namespace hpx
         LERR_(error) << "created exception: " << this->what();
     }
 
+    /// Construct a hpx::exception from a boost#system#error_code (this is
+    /// new for Boost V1.69).
+    exception::exception(boost::system::error_code const& e)
+      : boost::system::system_error(e)
+    {
+        LERR_(error) << "created exception: " << this->what();
+    }
+
     /// Construct a hpx::exception from a \a hpx::error and an error message.
     ///
     /// \param e      The parameter \p e holds the hpx::error code the new