| 1 | /* |
|---|---|
| 2 | Copyright 2020 Glen Joseph Fernandes |
| 3 | (glenjofe@gmail.com) |
| 4 | |
| 5 | Distributed under the Boost Software License, Version 1.0. |
| 6 | (http://www.boost.org/LICENSE_1_0.txt) |
| 7 | */ |
| 8 | #include <boost/core/lightweight_test.hpp> |
| 9 | |
| 10 | struct error |
| 11 | : std::exception { |
| 12 | const char* what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE { |
| 13 | return "message"; |
| 14 | } |
| 15 | }; |
| 16 | |
| 17 | void f() |
| 18 | { |
| 19 | throw error(); |
| 20 | } |
| 21 | |
| 22 | int main() |
| 23 | { |
| 24 | BOOST_TEST_NO_THROW(f()); |
| 25 | return boost::report_errors(); |
| 26 | } |
| 27 |
