mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-09 23:04:07 +00:00
move throw_exception implementation to test and benchmark folders
This commit is contained in:
parent
e2f19062ab
commit
7a55bf0e29
@ -6,7 +6,7 @@
|
||||
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <boost/histogram/axis.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
|
||||
using namespace boost::histogram;
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <boost/histogram/axis/regular.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/storage_adaptor.hpp>
|
||||
#include <boost/histogram/unlimited_storage.hpp>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <boost/histogram/axis.hpp>
|
||||
#include <boost/histogram/axis/traits.hpp>
|
||||
#include <boost/histogram/detail/axes.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/mp11/algorithm.hpp>
|
||||
#include <random>
|
||||
#include <tuple>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <random>
|
||||
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
|
||||
#include <gsl/gsl_histogram.h>
|
||||
#include <gsl/gsl_histogram2d.h>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/axis/regular.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <boost/histogram/indexed.hpp>
|
||||
#include <boost/histogram/literals.hpp>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <boost/histogram/accumulators/thread_safe.hpp>
|
||||
#include <boost/histogram/axis/regular.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <boost/histogram/make_histogram.hpp>
|
||||
#include <chrono>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <boost/histogram/algorithm/project.hpp>
|
||||
#include <boost/histogram/algorithm/sum.hpp>
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/literals.hpp>
|
||||
#include <vector>
|
||||
#include "utility_histogram.hpp"
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/axis/regular.hpp>
|
||||
#include <boost/histogram/axis/variable.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/unsafe_access.hpp>
|
||||
#include <vector>
|
||||
#include "utility_histogram.hpp"
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <boost/histogram/accumulators/weighted_sum.hpp>
|
||||
#include <boost/histogram/algorithm/sum.hpp>
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include "utility_histogram.hpp"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/axis/category.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include "utility_axis.hpp"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/axis/regular.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <type_traits>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/histogram/axis.hpp>
|
||||
#include <boost/histogram/axis/traits.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/mp11.hpp>
|
||||
#include "utility_axis.hpp"
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/axis/variable.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/axis/regular.hpp>
|
||||
#include <boost/histogram/axis/variant.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/serialization.hpp>
|
||||
#include "utility_axis.hpp"
|
||||
#include "utility_serialization.hpp"
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <boost/histogram/axis/regular.hpp>
|
||||
#include <boost/histogram/axis/variant.hpp>
|
||||
#include <boost/histogram/detail/cat.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/detail/type_name.hpp>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <boost/accumulators/statistics/stats.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/make_histogram.hpp>
|
||||
#include <boost/histogram/storage_adaptor.hpp>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <boost/histogram/make_histogram.hpp>
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/axis/ostream.hpp>
|
||||
#include <boost/histogram/axis/regular.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <boost/histogram/indexed.hpp>
|
||||
#include <boost/histogram/literals.hpp>
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <boost/histogram/accumulators/weighted_sum.hpp>
|
||||
#include <boost/histogram/axis.hpp>
|
||||
#include <boost/histogram/axis/ostream.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <boost/histogram/ostream.hpp>
|
||||
#include <boost/histogram/storage_adaptor.hpp>
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <boost/histogram/axis/regular.hpp>
|
||||
#include <boost/histogram/axis/variant.hpp>
|
||||
#include <boost/histogram/detail/meta.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <boost/histogram/unlimited_storage.hpp>
|
||||
#include <deque>
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <boost/histogram/detail/axes.hpp>
|
||||
#include <boost/histogram/detail/cat.hpp>
|
||||
#include <boost/histogram/detail/common_type.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/literals.hpp>
|
||||
#include <boost/histogram/storage_adaptor.hpp>
|
||||
#include <boost/histogram/unlimited_storage.hpp>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/detail/variant.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <sstream>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <algorithm>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/axis.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <boost/histogram/make_histogram.hpp>
|
||||
#include <cstdlib>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/algorithm/sum.hpp>
|
||||
#include <boost/histogram/axis.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/axis/regular.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <boost/histogram/literals.hpp>
|
||||
#include <boost/histogram/storage_adaptor.hpp>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/histogram/axis.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/axis.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/serialization.hpp>
|
||||
#include <cmath>
|
||||
#include "utility_histogram.hpp"
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <boost/histogram/accumulators/ostream.hpp>
|
||||
#include <boost/histogram/algorithm/sum.hpp>
|
||||
#include <boost/histogram/axis.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <boost/histogram/literals.hpp>
|
||||
#include <boost/histogram/make_histogram.hpp>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <boost/histogram/accumulators/thread_safe.hpp>
|
||||
#include <boost/histogram/algorithm/sum.hpp>
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/storage_adaptor.hpp>
|
||||
#include <iostream>
|
||||
#include <random>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/axis/variable.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/histogram.hpp>
|
||||
#include <boost/histogram/indexed.hpp>
|
||||
#include <boost/histogram/literals.hpp>
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <boost/histogram/accumulators/thread_safe.hpp>
|
||||
#include <boost/histogram/accumulators/weighted_mean.hpp>
|
||||
#include <boost/histogram/accumulators/weighted_sum.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <sstream>
|
||||
#include "is_close.hpp"
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <array>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/accumulators/thread_safe.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/serialization.hpp>
|
||||
#include <boost/histogram/storage_adaptor.hpp>
|
||||
#include <map>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/accumulators/weighted_mean.hpp>
|
||||
#include <boost/histogram/accumulators/weighted_sum.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/storage_adaptor.hpp>
|
||||
#include <boost/histogram/unlimited_storage.hpp>
|
||||
#include <cmath>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/accumulators/ostream.hpp>
|
||||
#include <boost/histogram/accumulators/thread_safe.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/storage_adaptor.hpp>
|
||||
|
||||
#include <array>
|
||||
|
21
test/throw_exception.hpp
Normal file
21
test/throw_exception.hpp
Normal file
@ -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
|
@ -7,7 +7,7 @@
|
||||
#include <boost/archive/text_iarchive.hpp>
|
||||
#include <boost/archive/text_oarchive.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/serialization.hpp>
|
||||
#include <boost/histogram/unlimited_storage.hpp>
|
||||
#include <memory>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <algorithm>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <boost/histogram/storage_adaptor.hpp>
|
||||
#include <boost/histogram/unlimited_storage.hpp>
|
||||
#include <boost/histogram/unsafe_access.hpp>
|
||||
|
@ -5,7 +5,7 @@
|
||||
// or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include "throw_exception.hpp"
|
||||
#include <sstream>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
Loading…
x
Reference in New Issue
Block a user