summaryrefslogtreecommitdiff
blob: 5f11379d80564d76ae4608a13733d35562af3d76 (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
Bug: https://bugs.gentoo.org/609692

--- a/mrt/timespy.cpp
+++ b/mrt/timespy.cpp
@@ -43,7 +43,7 @@
 		throw_io(("gettimeofday"));
 }
 
-TimeSpy::~TimeSpy() {
+TimeSpy::~TimeSpy() DTOR_NOEXCEPT {
 	struct timeval now;
 	if (gettimeofday(&now, NULL) == -1)
 		throw_io(("gettimeofday"));
--- a/mrt/timespy.h
+++ b/mrt/timespy.h
@@ -37,11 +37,17 @@
 #include "fmt.h"
 #include "export_mrt.h"
 
+#if __cplusplus >= 201103L
+#define DTOR_NOEXCEPT noexcept(false)
+#else
+#define DTOR_NOEXCEPT
+#endif
+
 namespace mrt {
 class MRTAPI TimeSpy {
 public: 
 	TimeSpy(const std::string &message);
-	~TimeSpy();
+	~TimeSpy() DTOR_NOEXCEPT;
 private: 
 	TimeSpy(const TimeSpy&);
 	const TimeSpy& operator=(const TimeSpy&);