2
0
mirror of https://github.com/boostorg/leaf.git synced 2026-01-19 04:22:08 +00:00
Files
leaf/test/lightweight_test.hpp
Emil Dotchevski 56b247d71a Significant refactoring:
- Support for error objects crossing DLL boundaries on Windows via BOOST_LEAF_CFG_WIN32=2.
- Internal TLS interface improvements, separating logical allocation from reading.
- Dynamic allocations (if enabled) for on_error objects now happens before stack unwinding begins.
- BOOST_LEAF_SYMBOL_VISIBLE declarations now separated in config/visibility.hpp.
2025-12-23 17:31:52 -05:00

24 lines
744 B
C++

// Copyright 2018-2024 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/leaf/config.hpp>
#include "boost/core/lightweight_test.hpp"
#ifdef BOOST_LEAF_NO_EXCEPTIONS
namespace boost
{
[[noreturn]] inline void throw_exception( std::exception const & e )
{
std::cerr << "Terminating due to a C++ exception under BOOST_LEAF_NO_EXCEPTIONS: " << e.what();
std::terminate();
}
struct source_location;
[[noreturn]] inline void throw_exception( std::exception const & e, boost::source_location const & )
{
throw_exception(e);
}
}
#endif