diff --git a/benchmark/axis_index.cpp b/benchmark/axis_index.cpp index f00e1be1..884a1ab9 100644 --- a/benchmark/axis_index.cpp +++ b/benchmark/axis_index.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include "throw_exception.hpp" using namespace boost::histogram; diff --git a/benchmark/histogram_filling.cpp b/benchmark/histogram_filling.cpp index 8e378f2f..e2598b49 100644 --- a/benchmark/histogram_filling.cpp +++ b/benchmark/histogram_filling.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include "throw_exception.hpp" #include #include diff --git a/benchmark/histogram_filling_experiments.cpp b/benchmark/histogram_filling_experiments.cpp index 36b1012d..2d20bc9c 100644 --- a/benchmark/histogram_filling_experiments.cpp +++ b/benchmark/histogram_filling_experiments.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/benchmark/histogram_filling_gsl.cpp b/benchmark/histogram_filling_gsl.cpp index 2241d5a2..47ac6bac 100644 --- a/benchmark/histogram_filling_gsl.cpp +++ b/benchmark/histogram_filling_gsl.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include "throw_exception.hpp" #include #include diff --git a/benchmark/histogram_iteration.cpp b/benchmark/histogram_iteration.cpp index 695f6d9e..08a3aef1 100644 --- a/benchmark/histogram_iteration.cpp +++ b/benchmark/histogram_iteration.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/benchmark/histogram_parallel_filling.cpp b/benchmark/histogram_parallel_filling.cpp index d0e98419..bcf8c40d 100644 --- a/benchmark/histogram_parallel_filling.cpp +++ b/benchmark/histogram_parallel_filling.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/include/boost/histogram/detail/throw_exception.hpp b/benchmark/throw_exception.hpp similarity index 100% rename from include/boost/histogram/detail/throw_exception.hpp rename to benchmark/throw_exception.hpp diff --git a/test/algorithm_project_test.cpp b/test/algorithm_project_test.cpp index 72b7f434..62b3dc37 100644 --- a/test/algorithm_project_test.cpp +++ b/test/algorithm_project_test.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include "utility_histogram.hpp" diff --git a/test/algorithm_reduce_test.cpp b/test/algorithm_reduce_test.cpp index c8eeecb5..619fc0b2 100644 --- a/test/algorithm_reduce_test.cpp +++ b/test/algorithm_reduce_test.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include "utility_histogram.hpp" diff --git a/test/algorithm_sum_test.cpp b/test/algorithm_sum_test.cpp index 398b44c1..53f80ac9 100644 --- a/test/algorithm_sum_test.cpp +++ b/test/algorithm_sum_test.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include "utility_histogram.hpp" diff --git a/test/axis_category_test.cpp b/test/axis_category_test.cpp index 2d025237..12d5afd8 100644 --- a/test/axis_category_test.cpp +++ b/test/axis_category_test.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/axis_integer_test.cpp b/test/axis_integer_test.cpp index 938b2d7b..7ec0a030 100644 --- a/test/axis_integer_test.cpp +++ b/test/axis_integer_test.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include "throw_exception.hpp" #include #include #include "utility_axis.hpp" diff --git a/test/axis_regular_test.cpp b/test/axis_regular_test.cpp index 1589a3e1..96ef9317 100644 --- a/test/axis_regular_test.cpp +++ b/test/axis_regular_test.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/axis_traits_test.cpp b/test/axis_traits_test.cpp index d6b04d8d..e0046c5b 100644 --- a/test/axis_traits_test.cpp +++ b/test/axis_traits_test.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include "utility_axis.hpp" diff --git a/test/axis_variable_test.cpp b/test/axis_variable_test.cpp index 719a02eb..ff3b4c54 100644 --- a/test/axis_variable_test.cpp +++ b/test/axis_variable_test.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/axis_variant_serialization_test.cpp b/test/axis_variant_serialization_test.cpp index 758bed70..9f71b5df 100644 --- a/test/axis_variant_serialization_test.cpp +++ b/test/axis_variant_serialization_test.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include "utility_axis.hpp" #include "utility_serialization.hpp" diff --git a/test/axis_variant_test.cpp b/test/axis_variant_test.cpp index 4924b1f9..b0834c93 100644 --- a/test/axis_variant_test.cpp +++ b/test/axis_variant_test.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/boost_accumulators_support_test.cpp b/test/boost_accumulators_support_test.cpp index 3f684f2c..b394342b 100644 --- a/test/boost_accumulators_support_test.cpp +++ b/test/boost_accumulators_support_test.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include diff --git a/test/boost_range_support_test.cpp b/test/boost_range_support_test.cpp index b939d6d3..cf1bedc3 100644 --- a/test/boost_range_support_test.cpp +++ b/test/boost_range_support_test.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/boost_units_support_test.cpp b/test/boost_units_support_test.cpp index 610a08cd..1a3df653 100644 --- a/test/boost_units_support_test.cpp +++ b/test/boost_units_support_test.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/deduction_guides_test.cpp b/test/deduction_guides_test.cpp index 2ac2fe89..8918ab28 100644 --- a/test/deduction_guides_test.cpp +++ b/test/deduction_guides_test.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/detail_meta_test.cpp b/test/detail_meta_test.cpp index 7530f60a..5cb87ff2 100644 --- a/test/detail_meta_test.cpp +++ b/test/detail_meta_test.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/detail_misc_test.cpp b/test/detail_misc_test.cpp index 44e80f1c..66ebeabc 100644 --- a/test/detail_misc_test.cpp +++ b/test/detail_misc_test.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/detail_variant_test.cpp b/test/detail_variant_test.cpp index 14c70c2b..553249df 100644 --- a/test/detail_variant_test.cpp +++ b/test/detail_variant_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/histogram_dynamic_test.cpp b/test/histogram_dynamic_test.cpp index 8611e5ab..320d7967 100644 --- a/test/histogram_dynamic_test.cpp +++ b/test/histogram_dynamic_test.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/histogram_growing_test.cpp b/test/histogram_growing_test.cpp index 0154405f..3fb713ea 100644 --- a/test/histogram_growing_test.cpp +++ b/test/histogram_growing_test.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/histogram_mixed_test.cpp b/test/histogram_mixed_test.cpp index 049a770e..6370d03f 100644 --- a/test/histogram_mixed_test.cpp +++ b/test/histogram_mixed_test.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/histogram_operators_test.cpp b/test/histogram_operators_test.cpp index ba0ab976..bba7dadd 100644 --- a/test/histogram_operators_test.cpp +++ b/test/histogram_operators_test.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/histogram_serialization_test.cpp b/test/histogram_serialization_test.cpp index 20779702..5fd68c31 100644 --- a/test/histogram_serialization_test.cpp +++ b/test/histogram_serialization_test.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include "throw_exception.hpp" #include #include #include "utility_histogram.hpp" diff --git a/test/histogram_test.cpp b/test/histogram_test.cpp index b2f1925a..c9d1a590 100644 --- a/test/histogram_test.cpp +++ b/test/histogram_test.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/histogram_threaded_test.cpp b/test/histogram_threaded_test.cpp index e948a01f..bc543ba7 100644 --- a/test/histogram_threaded_test.cpp +++ b/test/histogram_threaded_test.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/indexed_test.cpp b/test/indexed_test.cpp index 5bef45ce..750297eb 100644 --- a/test/indexed_test.cpp +++ b/test/indexed_test.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/internal_accumulators_test.cpp b/test/internal_accumulators_test.cpp index c028c8aa..f836d41e 100644 --- a/test/internal_accumulators_test.cpp +++ b/test/internal_accumulators_test.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include "is_close.hpp" diff --git a/test/storage_adaptor_serialization_test.cpp b/test/storage_adaptor_serialization_test.cpp index e2df71a5..d8b52346 100644 --- a/test/storage_adaptor_serialization_test.cpp +++ b/test/storage_adaptor_serialization_test.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/storage_adaptor_test.cpp b/test/storage_adaptor_test.cpp index f393a859..4b99cab3 100644 --- a/test/storage_adaptor_test.cpp +++ b/test/storage_adaptor_test.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/storage_adaptor_threaded_test.cpp b/test/storage_adaptor_threaded_test.cpp index 639de041..0ba47534 100644 --- a/test/storage_adaptor_threaded_test.cpp +++ b/test/storage_adaptor_threaded_test.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include diff --git a/test/throw_exception.hpp b/test/throw_exception.hpp new file mode 100644 index 00000000..e0160ed7 --- /dev/null +++ b/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 // std::abort +#include +#include + +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 diff --git a/test/unlimited_storage_serialization_test.cpp b/test/unlimited_storage_serialization_test.cpp index b7edff4a..d9c881ea 100644 --- a/test/unlimited_storage_serialization_test.cpp +++ b/test/unlimited_storage_serialization_test.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/unlimited_storage_test.cpp b/test/unlimited_storage_test.cpp index bc15d5a8..2655e1b7 100644 --- a/test/unlimited_storage_test.cpp +++ b/test/unlimited_storage_test.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "throw_exception.hpp" #include #include #include diff --git a/test/utility_test.cpp b/test/utility_test.cpp index bd100d3f..9e32f40d 100644 --- a/test/utility_test.cpp +++ b/test/utility_test.cpp @@ -5,7 +5,7 @@ // or copy at http://www.boost.org/LICENSE_1_0.txt) #include -#include +#include "throw_exception.hpp" #include #include #include