summaryrefslogtreecommitdiff
path: root/debian/patches/c++17.diff
blob: 1db1f485a30da49105f6b43d9355fa038811f46f (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
54
55
56
57
58
59
60
61
62
Description: Mark the comparator object as const callabled
 This fixes the build when using C++17
Author: Simon Chopin <simon.chopin@canonical.com>
--- a/lib/bbackupd/BackupDaemon.cpp
+++ b/lib/bbackupd/BackupDaemon.cpp
@@ -2339,7 +2339,7 @@
 	// by code, rather than the OS.
 	typedef struct
 	{
-		bool operator()(const std::string &s1, const std::string &s2)
+		bool operator()(const std::string &s1, const std::string &s2) const
 		{
 			if(s1.size() == s2.size())
 			{
--- a/lib/backupstore/HousekeepStoreAccount.cpp
+++ b/lib/backupstore/HousekeepStoreAccount.cpp
@@ -561,7 +561,7 @@
 //		Created: 11/12/03
 //
 // --------------------------------------------------------------------------
-bool HousekeepStoreAccount::DelEnCompare::operator()(const HousekeepStoreAccount::DelEn &x, const HousekeepStoreAccount::DelEn &y)
+bool HousekeepStoreAccount::DelEnCompare::operator()(const HousekeepStoreAccount::DelEn &x, const HousekeepStoreAccount::DelEn &y) const
 {
 	// STL spec says this:
 	// A Strict Weak Ordering is a Binary Predicate that compares two objects, returning true if the first precedes the second.
--- a/lib/backupstore/HousekeepStoreAccount.h
+++ b/lib/backupstore/HousekeepStoreAccount.h
@@ -72,7 +72,7 @@
 	
 	struct DelEnCompare
 	{
-		bool operator()(const DelEn &x, const DelEn &y);
+		bool operator()(const DelEn &x, const DelEn &y) const;
 	};
 	
 	int mAccountID;
--- a/lib/common/DebugMemLeakFinder.cpp
+++ b/lib/common/DebugMemLeakFinder.cpp
@@ -703,7 +703,7 @@
 }
 */
 
-void *operator new[](size_t size) throw (std::bad_alloc)
+void *operator new[](size_t size) noexcept(false)
 {
 	return internal_new(size, "standard libraries", 0);
 }
@@ -717,12 +717,12 @@
 	//TRACE1("delete[]() called, %08x\n", ptr);
 }
 
-void operator delete[](void *ptr) throw ()
+void operator delete[](void *ptr) noexcept
 {
 	internal_delete(ptr);
 }
 
-void operator delete(void *ptr) throw ()
+void operator delete(void *ptr) noexcept
 {
 	internal_delete(ptr);
 }