1/*
2Copyright 2020 Glen Joseph Fernandes
3(glenjofe@gmail.com)
4
5Distributed 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
10struct error
11 : std::exception {
12 const char* what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {
13 return "message";
14 }
15};
16
17void f()
18{
19 throw error();
20}
21
22int main()
23{
24 BOOST_TEST_NO_THROW(f());
25 return boost::report_errors();
26}
27

source code of boost/libs/core/test/lightweight_test_fail14.cpp