From 15914cdb0fc6c4c4e0acd410dd58177d0aa17fd2 Mon Sep 17 00:00:00 2001 From: Daniel Elstner Date: Sun, 11 Oct 2015 12:19:27 +0200 Subject: [PATCH] C++: Use noexcept instead of throw() Runtime-checked exception specifications via throw() are deprecated in C++11. --- bindings/cxx/classes.cpp | 4 ++-- bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index 25cb60b0..1b53d0a7 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -60,12 +60,12 @@ Error::Error(int result) : result(result) { } -const char *Error::what() const throw() +const char *Error::what() const noexcept { return sr_strerror(result); } -Error::~Error() throw() +Error::~Error() noexcept { } diff --git a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp index e93a5fb5..c36ee292 100644 --- a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp +++ b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp @@ -121,9 +121,9 @@ class SR_API Error: public exception { public: explicit Error(int result); - ~Error() throw(); + ~Error() noexcept; const int result; - const char *what() const throw(); + const char *what() const noexcept; }; /* Base template for classes whose resources are owned by a parent object. */