mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-09 23:04:07 +00:00
fix for failing tests with exception-handling=off
This commit is contained in:
parent
e415be10cd
commit
1540c4e94a
@ -6,7 +6,7 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
project(BoostHistogram VERSION 1.72.0 LANGUAGES CXX)
|
||||
project(BoostHistogram VERSION 1.73.0 LANGUAGES CXX)
|
||||
|
||||
add_library(boost_histogram INTERFACE)
|
||||
set_property(TARGET boost_histogram PROPERTY EXPORT_NAME histogram)
|
||||
|
@ -6,16 +6,20 @@
|
||||
|
||||
#ifdef BOOST_NO_EXCEPTIONS
|
||||
|
||||
#include <boost/assert/source_location.hpp>
|
||||
#include <cstdlib> // std::abort
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
|
||||
namespace boost {
|
||||
|
||||
// dummy implementation for user-defined function from boost/throw_exception.hpp
|
||||
inline void throw_exception(std::exception const& e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
inline void throw_exception(std::exception const& e, boost::source_location const& l) {
|
||||
std::cerr << l.file_name() << ":" << l.line() << ":" << l.column() << ": exception in '"
|
||||
<< l.function_name() << " \"" << e.what() << "\"" << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user