]> sigrok.org Git - libsigrok.git/blobdiff - bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp
C++: Declare all callbacks invoked from C noexcept
[libsigrok.git] / bindings / cxx / include / libsigrokcxx / libsigrokcxx.hpp
index e93a5fb5942f5b4b8689824840ef21d8cd5bbd6d..5946506666db4a23e509df8be9caf03a1d04ebf7 100644 (file)
@@ -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. */
@@ -246,11 +246,11 @@ private:
        virtual size_t read(const struct sr_resource *res, void *buf, size_t count) = 0;
 
        static SR_PRIV int open_callback(struct sr_resource *res,
-                       const char *name, void *cb_data);
+                       const char *name, void *cb_data) noexcept;
        static SR_PRIV int close_callback(struct sr_resource *res,
-                       void *cb_data);
+                       void *cb_data) noexcept;
        static SR_PRIV ssize_t read_callback(const struct sr_resource *res,
-                       void *buf, size_t count, void *cb_data);
+                       void *buf, size_t count, void *cb_data) noexcept;
        friend class Context;
 };