File Cpp17-compatibility.patch of Package libktorrent4
From 54aeec19aca29511af85e867043f4add905976ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=96mer=20Fad=C4=B1l=20USTA?= <omerusta@gmail.com>
Date: Sat, 31 Oct 2020 23:17:09 +0300
Subject: [PATCH] Cpp17 compatibility: Fix the dynamic exception throws which
is illegal in cpp17
Fixes error: ISO C++17 does not allow dynamic exception specifications
---
src/dht/kbucket.cpp | 2 +-
src/dht/kbucket.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/dht/kbucket.cpp b/src/dht/kbucket.cpp
index 3a0a7ff..d4c9ad1 100644
--- a/src/dht/kbucket.cpp
+++ b/src/dht/kbucket.cpp
@@ -81,7 +81,7 @@ namespace dht
}
- std::pair<KBucket::Ptr, KBucket::Ptr> KBucket::split() throw (KBucket::UnableToSplit)
+ std::pair<KBucket::Ptr, KBucket::Ptr> KBucket::split() noexcept(false)
{
dht::Key m = dht::Key::mid(min_key, max_key);
if(m == min_key || m + 1 == max_key)
diff --git a/src/dht/kbucket.h b/src/dht/kbucket.h
index d90d24f..6020334 100644
--- a/src/dht/kbucket.h
+++ b/src/dht/kbucket.h
@@ -83,7 +83,7 @@ namespace dht
* @return A pair of KBucket's
* @throw UnableToSplit if something goes wrong
*/
- std::pair<KBucket::Ptr, KBucket::Ptr> split() throw (UnableToSplit);
+ std::pair<KBucket::Ptr, KBucket::Ptr> split() noexcept(false);
/**
* Inserts an entry into the bucket.
--
GitLab