diff --git a/dune/xt/common/crtp.hh b/dune/xt/common/crtp.hh index 60fb864e78b381bb3d78ae0afaf56d8b27dc8fbc..292a095417c012922e63c86336faa945a0fc7b38 100644 --- a/dune/xt/common/crtp.hh +++ b/dune/xt/common/crtp.hh @@ -15,8 +15,6 @@ #include <atomic> #include <mutex> -#include <dune/xt/common/deprecated.hh> - #include "exceptions.hh" #ifdef CHECK_CRTP @@ -75,18 +73,6 @@ public: using Traits = TraitsImp; using derived_type = typename Traits::derived_type; - DXT_DEPRECATED_MSG("Use that.as_imp() instead (10.04.2018)!") - static inline derived_type& as_imp(InterfaceType& that) - { - return static_cast<derived_type&>(that); - } - - DXT_DEPRECATED_MSG("Use that.as_imp() instead (10.04.2018)!") - static inline const derived_type& as_imp(const InterfaceType& that) - { - return static_cast<const derived_type&>(that); - } - inline derived_type& as_imp() { return static_cast<derived_type&>(*this); @@ -115,13 +101,6 @@ std::recursive_mutex CRTPInterface<I, T>::crtp_mutex_; } // namespace Common - - -template <class I, class T> -using CRTPInterface DXT_DEPRECATED_MSG("CRTPInterface was moved into Dune::XT:Common namespace (2018/3/16)") = - Common::CRTPInterface<I, T>; - - } // namespace XT } // namespace Dune diff --git a/dune/xt/common/deprecated.hh b/dune/xt/common/deprecated.hh deleted file mode 100644 index f5f2c131501a9de62af9202b4bb8ff51a939ad7c..0000000000000000000000000000000000000000 --- a/dune/xt/common/deprecated.hh +++ /dev/null @@ -1,59 +0,0 @@ -// This file is part of the dune-xt project: -// https://github.com/dune-community/dune-xt -// Copyright 2009-2020 dune-xt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// René Fritze (2018 - 2019) -// Tobias Leibner (2020) - -#ifndef DUNE_XT_COMMON_DEPRECATED_HH -#define DUNE_XT_COMMON_DEPRECATED_HH - -#include <dune/common/deprecated.hh> - -/** usage examples - - // Deprecate a function -DXT_DEPRECATED -void foo(); - -// Deprecate a variable -DXT_DEPRECATED -int x; - -// Deprecate one declarator in a multi-declarator declaration -int y DXT_DEPRECATED, z; - -// Deprecate a function parameter -int triple(DXT_DEPRECATED int x); - -// Deprecate a class (or struct) -class DXT_DEPRECATED my_class { - public: - // Deprecate a member - DXT_DEPRECATED int member; -}; - -// Deprecate an enum -enum DXT_DEPRECATED animals { - CAT, DOG, MOUSE -}; - -// Deprecate a typedef -DXT_DEPRECATED -typedef int type; - -// Deprecate a template specialization -template <typename T> class templ; - -template <> -class DXT_DEPRECATED templ<int> {}; - - */ - -#define DXT_DEPRECATED [[deprecated]] -#define DXT_DEPRECATED_MSG(text) [[deprecated(#text)]] - -#endif // DUNE_XT_COMMON_DEPRECATED_HH diff --git a/dune/xt/common/exceptions.hh b/dune/xt/common/exceptions.hh index 9c0d787638c3de719b14470f297cee0b33f90dca..dbe4358c0444f2e5e140f86b64ab7be5d7f51bf7 100644 --- a/dune/xt/common/exceptions.hh +++ b/dune/xt/common/exceptions.hh @@ -17,7 +17,6 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/xt/common/color.hh> -#include <dune/xt/common/deprecated.hh> #ifdef DUNE_THROW # undef DUNE_THROW diff --git a/dune/xt/common/lapacke.hh b/dune/xt/common/lapacke.hh index 082c6cb8b79c8768576c4748599be67a30f9a28c..cafeee7bb44d6897b0d665267a94974b5ce16430 100644 --- a/dune/xt/common/lapacke.hh +++ b/dune/xt/common/lapacke.hh @@ -14,8 +14,6 @@ #include <complex> -#include <dune/xt/common/deprecated.hh> - namespace Dune { namespace XT { namespace Common { diff --git a/dune/xt/common/math.hh b/dune/xt/common/math.hh index 8124283364be6cdbcc5b2f1f158bb5982f8f289a..df946e265c5f7b0956115b08b72694a51407833b 100644 --- a/dune/xt/common/math.hh +++ b/dune/xt/common/math.hh @@ -34,7 +34,6 @@ #include <boost/static_assert.hpp> #include <dune/xt/common/reenable_warnings.hh> -#include <dune/common/deprecated.hh> #include <dune/common/promotiontraits.hh> #include <dune/xt/common/type_traits.hh> diff --git a/dune/xt/common/misc.hh b/dune/xt/common/misc.hh index fed29dbff3412d524d04bc8014ff85b0920b9e1d..35869eef2c31c521cc88ee16753cdce2b5997701 100644 --- a/dune/xt/common/misc.hh +++ b/dune/xt/common/misc.hh @@ -43,12 +43,12 @@ #include <dune/xt/common/exceptions.hh> #include <dune/xt/common/logging.hh> -#include <dune/xt/common/deprecated.hh> namespace Dune { namespace XT { namespace Common { + //! element-index-in-container search template <class StlSequence> inline int get_idx(const StlSequence& ct, const typename StlSequence::value_type& val) @@ -59,48 +59,6 @@ inline int get_idx(const StlSequence& ct, const typename StlSequence::value_type return std::distance(ct.begin(), result); } // get_idx -/** this allows subscription indices to wrap around - * \example N=4: WraparoundArray[4] == WraparoundArray[0] && WraparoundArray[-1] == WraparoundArray[3] - **/ -template <class T, size_t N> -struct WraparoundArray : public std::array<T, N> -{ - typedef std::array<T, N> BaseType; - WraparoundArray() - { - for (size_t i = 0; i < N; ++i) - this->operator[](i) = T(); - } - - WraparoundArray(const BaseType other) - { - for (size_t i = 0; i < N; ++i) - this->operator[](i) = other[i]; - } - - typename BaseType::reference operator[](std::size_t i) - { - return BaseType::operator[](i % N); - } - - typename BaseType::reference operator[](int i) - { - const std::size_t real_index = i < 0 ? static_cast<std::size_t>(N - (((i * -1) % N) + 1)) : std::size_t(i); - return BaseType::operator[](real_index); - } // [] - - typename BaseType::const_reference operator[](std::size_t i) const - { - return BaseType::operator[](i % N); - } - - typename BaseType::const_reference operator[](int i) const - { - const std::size_t real_index = i < 0 ? static_cast<std::size_t>(N - (((i * -1) % N) + 1)) : std::size_t(i); - return BaseType::operator[](real_index); - } // [] -}; - //! type safe (this will not compile for degraded-to-pointer arrays) way of getting array length template <class T, size_t N> size_t array_length(T (&/*array*/)[N]) @@ -139,38 +97,6 @@ std::array<T, N> make_array(const std::vector<T>& v) //! writes process environment to file void dump_environment(boost::filesystem::ofstream& file, std::string csv_sep = ","); -/** abstraction for stdlibs w/o map.emplace - * This isn't covering the full emplace spec, and the piecewise case potentially improper, - * but we only need this in an Intel MIC setup with weird lib versioning. - * Normally we'd depend on the full gcc 4.8 stack atm and do not use the insert fallback - **/ -template <typename Key, typename T, typename MapType> -std::pair<typename MapType::iterator, bool> map_emplace(MapType& map_in, Key key, T value) -{ -#if HAVE_MAP_EMPLACE - return map_in.emplace(key, value); -#else - DXTC_LOG_DEBUG_0 << "using map.insert fallback instead of emplace\n"; - return map_in.insert(typename MapType::value_type(key, value)); -#endif -} - -template <typename K, typename V, typename MapType> -DXT_DEPRECATED_MSG("no longer needed with c++14 (2018/03/20)") -std::pair<typename MapType::iterator, bool> map_emplace(MapType& map_in, - std::piecewise_construct_t pcw, - K&& keys, - V&& values) -{ - return map_in.emplace(pcw, keys, values); -} - -template <typename T> -struct remove_const_reference -{ - typedef typename std::remove_reference<typename std::remove_const<T>::type>::type type; -}; - } // namespace Common } // namespace XT } // namespace Dune diff --git a/dune/xt/common/python.hh b/dune/xt/common/python.hh index e24afca6b52e31184becc56c9864b7c5d35eb75f..f903592737146188a815eae0689733b0c589ebbe 100644 --- a/dune/xt/common/python.hh +++ b/dune/xt/common/python.hh @@ -18,8 +18,6 @@ #include <dune/pybindxi/pybind11.h> -#include <dune/xt/common/deprecated.hh> - namespace Dune { namespace XT { namespace Common { @@ -29,12 +27,12 @@ namespace bindings { void guarded_bind(const std::function<void()>& registrar); -DXT_DEPRECATED_MSG("This is not required any more (08.08.2019)!") -void add_initialization(pybind11::module& /*m*/, std::string /*logger_name*/, std::string /*so_name*/ = ""); +[[deprecated("This is not required any more (08.08.2019)!")]] void +add_initialization(pybind11::module& /*m*/, std::string /*logger_name*/, std::string /*so_name*/ = ""); -DXT_DEPRECATED_MSG("use guarded_bind() instead (08.08.2019)!") -void try_register(pybind11::module& m, const std::function<void(pybind11::module&)>& registrar); +[[deprecated("use guarded_bind() instead (08.08.2019)!")]] void +try_register(pybind11::module& m, const std::function<void(pybind11::module&)>& registrar); } // namespace bindings diff --git a/dune/xt/functions/interfaces/flux-function.hh b/dune/xt/functions/interfaces/flux-function.hh index eff81d41652fba846f9aa4152e8c0214c4a18380..864b384ac94cecc6e54deade9d6c4cb80b3683ab 100644 --- a/dune/xt/functions/interfaces/flux-function.hh +++ b/dune/xt/functions/interfaces/flux-function.hh @@ -20,8 +20,6 @@ #include <dune/common/parallel/mpihelper.hh> -#include <dune/common/deprecated.hh> - #include <dune/grid/io/file/vtk.hh> #include <dune/xt/common/filesystem.hh> diff --git a/dune/xt/functions/interfaces/grid-function.hh b/dune/xt/functions/interfaces/grid-function.hh index c87ff4ec4d1951717cee8228bf897a3c8ad5c5bf..be530e456a8884ba5063773dedd137356fa53783 100644 --- a/dune/xt/functions/interfaces/grid-function.hh +++ b/dune/xt/functions/interfaces/grid-function.hh @@ -21,8 +21,6 @@ #include <dune/common/parallel/mpihelper.hh> -#include <dune/common/deprecated.hh> - #include <dune/grid/io/file/vtk.hh> #include <dune/xt/common/filesystem.hh> diff --git a/dune/xt/grid/entity.hh b/dune/xt/grid/entity.hh index 1765359cf8b2f480de85b425c3de39eaa7548a21..5e0bafcad6ab840b88615ae89ff0bd33aab7600e 100644 --- a/dune/xt/grid/entity.hh +++ b/dune/xt/grid/entity.hh @@ -18,7 +18,6 @@ #include <dune/grid/common/entity.hh> #include <dune/grid/common/gridview.hh> -#include <dune/xt/common/deprecated.hh> #include <dune/xt/common/print.hh> #include <dune/xt/common/ranges.hh> #include <dune/xt/common/string.hh> diff --git a/dune/xt/grid/intersection.hh b/dune/xt/grid/intersection.hh index fbae9dc88a1c7490d067eea712aaabbc4a1e3ea4..0519110aad00197e070efa489c5819b1ece134b3 100644 --- a/dune/xt/grid/intersection.hh +++ b/dune/xt/grid/intersection.hh @@ -170,7 +170,7 @@ bool contains(const Dune::Intersection<G, I>& intersection, template <class G, class I> -void DUNE_DEPRECATED_MSG("Use out << print(intersection) from <dune/xt/grid/print.hh> instead (05.07.2020)!") +[[deprecated("Use out << print(intersection) from <dune/xt/grid/print.hh> instead (05.07.2020)!")]] void operator<<(std::ostream& /*out*/, const Dune::Intersection<G, I>& intersection) { XT::Common::print(intersection); diff --git a/dune/xt/grid/type_traits.hh b/dune/xt/grid/type_traits.hh index dbd3c7daa3dc2ecb1b77d1cfc5d94a69db47d244..a660465b4d01c18b4a70dc4876100affd7da4176 100644 --- a/dune/xt/grid/type_traits.hh +++ b/dune/xt/grid/type_traits.hh @@ -18,7 +18,6 @@ #include <dune/grid/common/intersection.hh> #include <dune/grid/common/gridview.hh> -#include <dune/xt/common/deprecated.hh> #include <dune/xt/common/type_traits.hh> #if HAVE_ALBERTA @@ -458,13 +457,12 @@ using extract_iterator_t = typename extract_iterator<T, c, pit>::type; template <class T, PartitionIteratorType pit, int c = 0, bool view = is_view<T>::value, bool part = is_part<T>::value> -struct DXT_DEPRECATED_MSG("Use extract_iterator instead (24.04.2018)!") extract_partition_iterator - : public extract_iterator<T, c, pit, view, part> -{}; +struct [[deprecated("Use extract_iterator instead (24.04.2018)!")]] extract_partition_iterator + : public extract_iterator<T, c, pit, view, part>{}; template <class T, PartitionIteratorType pit, int c = 0> -using extract_partition_iterator_t - DXT_DEPRECATED_MSG("Use extract_iterator_t instead (24.04.2018)!") = extract_iterator_t<T, c, pit>; +using extract_partition_iterator_t [[deprecated("Use extract_iterator_t instead (24.04.2018)!")]] = + extract_iterator_t<T, c, pit>; } // namespace Grid diff --git a/dune/xt/la/container/vector-interface.hh b/dune/xt/la/container/vector-interface.hh index 9fcf3d3731e49b1b2e4fb6cff6f710e0cd0ad773..66b499502fedce4865ebde4247364aafc59ebccc 100644 --- a/dune/xt/la/container/vector-interface.hh +++ b/dune/xt/la/container/vector-interface.hh @@ -23,7 +23,6 @@ #include <dune/common/unused.hh> #include <dune/xt/common/crtp.hh> -#include <dune/xt/common/deprecated.hh> #include <dune/xt/common/exceptions.hh> #include <dune/xt/common/float_cmp.hh> #include <dune/xt/common/math.hh> @@ -198,11 +197,6 @@ public: return this->as_imp()[ii]; } - DXT_DEPRECATED_MSG("Use size() instead (09.04.2018)!") inline size_t dim() const - { - return size(); - } - virtual ScalarType min() const { return complex_switch::min(this->as_imp()); diff --git a/dune/xt/test/common.hh b/dune/xt/test/common.hh index 5bb0f423f327a73b13c6f153874e540ef851a332..2c3cf032ede188b484888d4663aa61b3db7aeb79 100644 --- a/dune/xt/test/common.hh +++ b/dune/xt/test/common.hh @@ -25,7 +25,6 @@ #include <dune/xt/common/configuration.hh> #include <dune/xt/common/convergence-study.hh> #include <dune/xt/common/compiler.hh> -#include <dune/xt/common/deprecated.hh> #include <dune/xt/test/gtest/gtest.h> #include <dune/xt/common/vector.hh> @@ -117,9 +116,9 @@ void check_eoc_study_for_success( const double& zero_tolerance = 1e-15); -DXT_DEPRECATED_MSG("Does not make any sense with the new ConvergenceStudy (25.01.2019)!") -void print_collected_eoc_study_results(const std::map<std::string, std::vector<double>>& results, - std::ostream& out = std::cout); +[[deprecated("Does not make any sense with the new ConvergenceStudy (25.01.2019)!")]] void +print_collected_eoc_study_results(const std::map<std::string, std::vector<double>>& results, + std::ostream& out = std::cout); // returns unsigned int on purpose, see GridProvider diff --git a/python/dune/pybindxi/__init__.py b/python/dune/pybindxi/__init__.py index d9aedb285655e07d413a27f8f79b11f5bf761754..a7268666fa98a4338a4e011c496c3338bf5ec257 100644 --- a/python/dune/pybindxi/__init__.py +++ b/python/dune/pybindxi/__init__.py @@ -8,4 +8,3 @@ # Authors: # René Fritze (2018, 2020) # ~~~ - diff --git a/python/dune/xt/common/exceptions.bindings.hh b/python/dune/xt/common/exceptions.bindings.hh index 52412af174702f4ca84c824d6485c9eb56284192..73c844340a857de0f71736922def2c35a14fa3b9 100644 --- a/python/dune/xt/common/exceptions.bindings.hh +++ b/python/dune/xt/common/exceptions.bindings.hh @@ -12,8 +12,6 @@ #ifndef DUNE_XT_COMMON_EXCEPTIONS_BINDINGS_HH #define DUNE_XT_COMMON_EXCEPTIONS_BINDINGS_HH -#include <dune/xt/common/deprecated.hh> - namespace pybind11 { class module; } @@ -24,8 +22,8 @@ namespace Common { namespace bindings { -DXT_DEPRECATED_MSG("you no longer need to call this for your module") -void addbind_exceptions(pybind11::module&) {} // ... addbind_exceptions(...) +[[deprecated("you no longer need to call this for your module")]] void addbind_exceptions(pybind11::module&) { +} // ... addbind_exceptions(...) } // namespace bindings diff --git a/python/dune/xt/grid/available_types.hh b/python/dune/xt/grid/available_types.hh index 09b909c72a2307b8c52c828cc7fb93e4a53099d0..4f8533cfdbe7436e20d3a4eea223bd17ba41ac0f 100644 --- a/python/dune/xt/grid/available_types.hh +++ b/python/dune/xt/grid/available_types.hh @@ -17,7 +17,6 @@ #ifndef PYTHON_DUNE_XT_GRID_TYPES_HH # define PYTHON_DUNE_XT_GRID_TYPES_HH -# include <dune/xt/common/deprecated.hh> # include <dune/xt/grid/grids.hh> namespace Dune { @@ -26,8 +25,8 @@ namespace Grid { namespace bindings { -using AvailableTypes - DXT_DEPRECATED_MSG("Use XT::Grid::AvailableGridTypes instead (31.07.2019)!") = Dune::XT::Grid::AvailableGridTypes; +using AvailableTypes [[deprecated("Use XT::Grid::AvailableGridTypes instead (31.07.2019)!")]] = + Dune::XT::Grid::AvailableGridTypes; } // namespace bindings diff --git a/python/dune/xt/grid/layers.bindings.hh b/python/dune/xt/grid/layers.bindings.hh index 729b6d99554b745aaa61630aecb50edaf20f09d2..f4ab628ea3a80f2eb231795b2cde62a1548e62fd 100644 --- a/python/dune/xt/grid/layers.bindings.hh +++ b/python/dune/xt/grid/layers.bindings.hh @@ -46,7 +46,7 @@ struct backend_name<Backends::view> template <Layers layer> struct layer_name { - DXT_DEPRECATED_MSG("use layer_names[layer] directly. 2018/7/2") static std::string value() + [[deprecated("use layer_names[layer] directly. 2018/7/2")]] static std::string value() { return layer_names[layer]; }