diff --git a/include/boost/histogram/accumulators.hpp b/include/boost/histogram/accumulators.hpp index fec479d3..94a89597 100644 --- a/include/boost/histogram/accumulators.hpp +++ b/include/boost/histogram/accumulators.hpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/include/boost/histogram/accumulators/ostream.hpp b/include/boost/histogram/accumulators/ostream.hpp index 586d2402..38e3c894 100644 --- a/include/boost/histogram/accumulators/ostream.hpp +++ b/include/boost/histogram/accumulators/ostream.hpp @@ -93,15 +93,6 @@ std::basic_ostream& operator<<(std::basic_ostream& return detail::handle_nonzero_width(os, x); } -#include -template -std::basic_ostream& operator<<(std::basic_ostream& os, - const thread_safe& x) { - os << static_cast(x); - return os; -} -#include - } // namespace accumulators } // namespace histogram } // namespace boost diff --git a/include/boost/histogram/accumulators/sum.hpp b/include/boost/histogram/accumulators/sum.hpp index 1a7d8442..a09e96c7 100644 --- a/include/boost/histogram/accumulators/sum.hpp +++ b/include/boost/histogram/accumulators/sum.hpp @@ -100,6 +100,7 @@ public: /// Return small part of the sum. const_reference small_part() const noexcept { return small_; } + // note: windows.h illegially uses `#define small char`, cannot use method "small" // lossy conversion to value type must be explicit explicit operator value_type() const noexcept { return value(); } @@ -156,25 +157,6 @@ public: // end: extra operators - // windows.h illegially uses `#define small char` which breaks this now deprecated API -#if !defined(small) - - /// Return large part of the sum. - [[deprecated("use large_part() instead; " - "large() will be removed in boost-1.80")]] const_reference - large() const noexcept { - return large_; - } - - /// Return small part of the sum. - [[deprecated("use small_part() instead; " - "small() will be removed in boost-1.80")]] const_reference - small() const noexcept { - return small_; - } - -#endif - private: value_type large_{}; value_type small_{}; diff --git a/include/boost/histogram/accumulators/thread_safe.hpp b/include/boost/histogram/accumulators/thread_safe.hpp deleted file mode 100644 index 94161c5a..00000000 --- a/include/boost/histogram/accumulators/thread_safe.hpp +++ /dev/null @@ -1,82 +0,0 @@ -// 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) - -#ifndef BOOST_HISTOGRAM_ACCUMULATORS_THREAD_SAFE_HPP -#define BOOST_HISTOGRAM_ACCUMULATORS_THREAD_SAFE_HPP - -#include -#include -#include -#include - -namespace boost { -namespace histogram { -namespace accumulators { - -// cannot use new mechanism with accumulators::thread_safe -template -struct is_thread_safe> : std::true_type {}; - -/** Thread-safe adaptor for builtin integral numbers. - - This adaptor uses atomic operations to make concurrent increments and additions safe for - the stored value. - - On common computing platforms, the adapted integer has the same size and - alignment as underlying type. The atomicity is implemented with a special CPU - instruction. On exotic platforms the size of the adapted number may be larger and/or the - type may have different alignment, which means it cannot be tightly packed into arrays. - - @tparam T type to adapt, must be an integral type. - */ -template -class [[deprecated("use count instead; " - "thread_safe will be removed in boost-1.79")]] thread_safe - : public std::atomic { -public: - using value_type = T; - using super_t = std::atomic; - - thread_safe() noexcept : super_t(static_cast(0)) {} - // non-atomic copy and assign is allowed, because storage is locked in this case - thread_safe(const thread_safe& o) noexcept : super_t(o.load()) {} - thread_safe& operator=(const thread_safe& o) noexcept { - super_t::store(o.load()); - return *this; - } - - thread_safe(value_type arg) : super_t(arg) {} - thread_safe& operator=(value_type arg) { - super_t::store(arg); - return *this; - } - - thread_safe& operator+=(const thread_safe& arg) { - operator+=(arg.load()); - return *this; - } - thread_safe& operator+=(value_type arg) { - super_t::fetch_add(arg, std::memory_order_relaxed); - return *this; - } - thread_safe& operator++() { - operator+=(static_cast(1)); - return *this; - } - - template - void serialize(Archive & ar, unsigned /* version */) { - auto value = super_t::load(); - ar& make_nvp("value", value); - super_t::store(value); - } -}; - -} // namespace accumulators -} // namespace histogram -} // namespace boost - -#endif diff --git a/include/boost/histogram/algorithm/reduce.hpp b/include/boost/histogram/algorithm/reduce.hpp index b0f7c7fc..c342d6aa 100644 --- a/include/boost/histogram/algorithm/reduce.hpp +++ b/include/boost/histogram/algorithm/reduce.hpp @@ -33,10 +33,6 @@ namespace algorithm { */ using reduce_command = detail::reduce_command; -using reduce_option [[deprecated("use reduce_command instead; " - "reduce_option will be removed in boost-1.80")]] = - reduce_command; ///< deprecated - /** Shrink command to be used in `reduce`. Command is applied to axis with given index. diff --git a/include/boost/histogram/axis/traits.hpp b/include/boost/histogram/axis/traits.hpp index 7e66d4eb..26dce06b 100644 --- a/include/boost/histogram/axis/traits.hpp +++ b/include/boost/histogram/axis/traits.hpp @@ -192,12 +192,6 @@ struct is_reducible; template #ifndef BOOST_HISTOGRAM_DOXYGEN_INVOKED using get_options = decltype(detail::traits_options(detail::priority<2>{})); - -template -using static_options [[deprecated("use get_options instead; " - "static_options will be removed in boost-1.80")]] = - get_options; - #else struct get_options; #endif @@ -223,13 +217,6 @@ struct get_options; template #ifndef BOOST_HISTOGRAM_DOXYGEN_INVOKED using is_inclusive = decltype(detail::traits_is_inclusive(detail::priority<1>{})); - -template -using static_is_inclusive - [[deprecated("use is_inclusive instead; " - "static_is_inclusive will be removed in boost-1.80")]] = - is_inclusive; - #else struct is_inclusive; #endif diff --git a/include/boost/histogram/fwd.hpp b/include/boost/histogram/fwd.hpp index 1b5fa014..b5a2df2f 100644 --- a/include/boost/histogram/fwd.hpp +++ b/include/boost/histogram/fwd.hpp @@ -106,12 +106,6 @@ class mean; template class weighted_mean; -template -class thread_safe; - -template -struct is_thread_safe; - } // namespace accumulators struct unsafe_access; diff --git a/include/boost/histogram/indexed.hpp b/include/boost/histogram/indexed.hpp index 3c9e8490..7eae5dc0 100644 --- a/include/boost/histogram/indexed.hpp +++ b/include/boost/histogram/indexed.hpp @@ -64,9 +64,6 @@ public: using value_type = typename std::iterator_traits::value_type; class iterator; - using range_iterator [[deprecated("use iterator instead; " - "range_iterator will be removed in boost-1.80")]] = - iterator; ///< deprecated /** Lightweight view to access value and index of current cell. @@ -86,9 +83,6 @@ public: public: using const_reference = const axis::index_type&; - using reference [[deprecated("use const_reference instead; " - "reference will be removed in boost-1.80")]] = - const_reference; ///< deprecated /// implementation detail class const_iterator diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 142f6cef..007c0f56 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -99,8 +99,6 @@ if (Threads_FOUND) LINK_LIBRARIES Threads::Threads) boost_test(TYPE run SOURCES accumulators_count_thread_safe_test.cpp LINK_LIBRARIES Threads::Threads) - boost_test(TYPE run SOURCES accumulators_thread_safe_test.cpp - LINK_LIBRARIES Threads::Threads) endif() diff --git a/test/Jamfile b/test/Jamfile index a61e16ce..1fc81092 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -123,7 +123,6 @@ alias threading : [ run histogram_threaded_test.cpp ] [ run storage_adaptor_threaded_test.cpp ] [ run accumulators_count_thread_safe_test.cpp ] - [ run accumulators_thread_safe_test.cpp ] : multi ; diff --git a/test/accumulators_sum_test.cpp b/test/accumulators_sum_test.cpp index b5708646..b22f8c9d 100644 --- a/test/accumulators_sum_test.cpp +++ b/test/accumulators_sum_test.cpp @@ -32,13 +32,6 @@ int main() { BOOST_TEST_EQ(str(sum, 15, false), " sum(1 + 0)"s); BOOST_TEST_EQ(str(sum, 15, true), "sum(1 + 0) "s); -#include - - BOOST_TEST_EQ(sum.large(), 1); - BOOST_TEST_EQ(sum.small(), 0); - -#include - sum += 1e100; BOOST_TEST_EQ(sum, (s_t{1e100, 1})); ++sum; diff --git a/test/accumulators_thread_safe_test.cpp b/test/accumulators_thread_safe_test.cpp deleted file mode 100644 index 654d6797..00000000 --- a/test/accumulators_thread_safe_test.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2015-2018 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) - -#include -#include -#include -#include -#include "throw_exception.hpp" -#include "utility_str.hpp" - -using namespace boost::histogram; -using namespace std::literals; - -#include - -int main() { - using ts_t = accumulators::thread_safe; - - ts_t i; - ++i; - i += 1000; - - BOOST_TEST_EQ(i, 1001); - BOOST_TEST_EQ(str(i), "1001"s); - - ts_t j{5}; - i = j; - BOOST_TEST_EQ(i, 5); - - BOOST_TEST_EQ(ts_t{} += ts_t{}, ts_t{}); - - return boost::report_errors(); -} - -#include diff --git a/test/check_odr_test.py b/test/check_odr_test.py index 56da1d44..030ac74d 100755 --- a/test/check_odr_test.py +++ b/test/check_odr_test.py @@ -30,7 +30,7 @@ root_include_path = include_path[: include_path.rindex("boost")] for root, dirs, files in os.walk(include_path): for fn in files: fn = os.path.join(root, fn) - fn = fn[len(root_include_path) :] + fn = fn[len(root_include_path) :] # noqa if fn.endswith("debug.hpp"): # is never included continue all_headers.add(fn) diff --git a/test/histogram_ostream_test.cpp b/test/histogram_ostream_test.cpp index ed52399a..8adfce0d 100644 --- a/test/histogram_ostream_test.cpp +++ b/test/histogram_ostream_test.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -129,28 +128,6 @@ void run_tests() { BOOST_TEST_CSTR_EQ(str(h, 40).c_str(), expected); } - // regular with accumulators::thread_safe - { -#include - auto h = - make_s(Tag(), dense_storage>(), R2(3, -0.5, 1.0)); - h.at(0) = 1; - h.at(1) = 10; - h.at(2) = 5; - - const auto expected = "BEGIN\n" - "histogram(regular(3, -0.5, 1, options=none))\n" - " ┌───────────────────────┐\n" - "[-0.5, 0) 1 │██▎ │\n" - "[ 0, 0.5) 10 │██████████████████████ │\n" - "[ 0.5, 1) 5 │███████████ │\n" - " └───────────────────────┘\n" - "END"; - - BOOST_TEST_CSTR_EQ(str(h, 40).c_str(), expected); -#include - } - // regular with accumulators::sum { auto h = make_s(Tag(), dense_storage>(), R2(3, -0.5, 1.0)); diff --git a/test/odr_test.cpp b/test/odr_test.cpp index 8f2f4822..9ed2d8fa 100644 --- a/test/odr_test.cpp +++ b/test/odr_test.cpp @@ -14,3 +14,6 @@ #include #include #include + +#include +#include diff --git a/test/storage_adaptor_serialization_test.cpp b/test/storage_adaptor_serialization_test.cpp index c4e9e3c9..e73b88a8 100644 --- a/test/storage_adaptor_serialization_test.cpp +++ b/test/storage_adaptor_serialization_test.cpp @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -43,10 +42,6 @@ int main(int argc, char** argv) { join(argv[1], "storage_adaptor_serialization_test_map_double.xml")); test_serialization>>( join(argv[1], "storage_adaptor_serialization_test_vector_thread_safe_int.xml")); -#include - test_serialization>>( - join(argv[1], "storage_adaptor_serialization_test_vector_thread_safe_int.xml")); -#include return boost::report_errors(); }