From ef89859726b03245ff49e48999fc5f2e4b447b42 Mon Sep 17 00:00:00 2001 From: Grant Henke Date: Mon, 23 Nov 2020 17:06:38 -0600 Subject: [PATCH 1/2] Fix usage with C++17 When using with C++17 I got the following error: ev++.h:355:46: error: ISO C++1z does not allow dynamic exception specifications dynamic_loop (unsigned int flags = AUTO) throw (bad_loop) This patch fixes the error by replacing `throw (bad_loop)` with `noexcept(false)`. --- ev++.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ev++.h b/ev++.h index 4f0a36a..361bf5a 100644 --- a/ev++.h +++ b/ev++.h @@ -352,7 +352,7 @@ namespace ev { struct dynamic_loop : loop_ref { - dynamic_loop (unsigned int flags = AUTO) throw (bad_loop) + dynamic_loop (unsigned int flags = AUTO) noexcept(false) : loop_ref (ev_loop_new (flags)) { if (!EV_AX) @@ -376,7 +376,7 @@ namespace ev { struct default_loop : loop_ref { - default_loop (unsigned int flags = AUTO) throw (bad_loop) + default_loop (unsigned int flags = AUTO) throw noexcept(false) #if EV_MULTIPLICITY : loop_ref (ev_default_loop (flags)) #endif From 4d217453a90d0ad5e9df9e6ca6b53df62f6444e7 Mon Sep 17 00:00:00 2001 From: Grant Henke Date: Mon, 23 Nov 2020 19:30:51 -0600 Subject: [PATCH 2/2] Update ev++.h --- ev++.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ev++.h b/ev++.h index 361bf5a..ec7232d 100644 --- a/ev++.h +++ b/ev++.h @@ -376,7 +376,7 @@ namespace ev { struct default_loop : loop_ref { - default_loop (unsigned int flags = AUTO) throw noexcept(false) + default_loop (unsigned int flags = AUTO) noexcept(false) #if EV_MULTIPLICITY : loop_ref (ev_default_loop (flags)) #endif