File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ class PyExample12 : public Example12 {
56
56
/* This function has no arguments. The trailing comma
57
57
in the previous line is needed for some compilers */
58
58
);
59
- throw std::runtime_error (" this will never be reached" );
60
59
}
61
60
62
61
virtual void pure_virtual () {
Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ struct error_already_set : public std::runtime_error { public: error_already_set
324
324
// / Thrown when pybind11::cast or handle::call fail due to a type casting error
325
325
struct cast_error : public std ::runtime_error { public: cast_error(const std::string &w = " " ) : std::runtime_error(w) {} };
326
326
327
- PYBIND11_NOINLINE inline void pybind11_fail (const char *reason) { throw std::runtime_error (reason); }
328
- PYBIND11_NOINLINE inline void pybind11_fail (const std::string &reason) { throw std::runtime_error (reason); }
327
+ [[noreturn]] PYBIND11_NOINLINE inline void pybind11_fail (const char *reason) { throw std::runtime_error (reason); }
328
+ [[noreturn]] PYBIND11_NOINLINE inline void pybind11_fail (const std::string &reason) { throw std::runtime_error (reason); }
329
329
330
330
NAMESPACE_END (pybind11)
You can’t perform that action at this time.
0 commit comments