move throw_exception implementation to test and benchmark folders

This commit is contained in:
Hans Dembinski 2019-05-28 23:15:17 +02:00
parent e2f19062ab
commit 7a55bf0e29
40 changed files with 59 additions and 38 deletions

View File

@ -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;

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -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"

View File

@ -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>

View File

@ -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"

View File

@ -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>

View File

@ -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"

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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"

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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"

View File

@ -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>

View File

@ -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>

View File

@ -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
View 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

View File

@ -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>

View File

@ -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>

View File

@ -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>