diff options
Diffstat (limited to 'src/boost/libs/histogram/test/throw_exception.hpp')
-rw-r--r-- | src/boost/libs/histogram/test/throw_exception.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/boost/libs/histogram/test/throw_exception.hpp b/src/boost/libs/histogram/test/throw_exception.hpp new file mode 100644 index 00000000..e0160ed7 --- /dev/null +++ b/src/boost/libs/histogram/test/throw_exception.hpp @@ -0,0 +1,21 @@ +// Copyright 2019 Hans Dembinski +// +// 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) + +#ifdef BOOST_NO_EXCEPTIONS + +#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; + std::abort(); +} +} // namespace boost + +#endif |