diff options
Diffstat (limited to 'debian/patches/c++17.diff')
-rw-r--r-- | debian/patches/c++17.diff | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/debian/patches/c++17.diff b/debian/patches/c++17.diff new file mode 100644 index 00000000..1db1f485 --- /dev/null +++ b/debian/patches/c++17.diff @@ -0,0 +1,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); + } |