From 6845acf7327f8ea6a58cd26156699e6dc737f023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org> Date: Sun, 19 Dec 2021 16:03:34 +0100 Subject: [PATCH] Remove deprecated lcm.hh and gcd.hh. --- CHANGELOG.md | 3 +++ dune/common/CMakeLists.txt | 2 -- dune/common/gcd.hh | 27 ---------------------- dune/common/lcm.hh | 46 -------------------------------------- 4 files changed, 3 insertions(+), 75 deletions(-) delete mode 100644 dune/common/gcd.hh delete mode 100644 dune/common/lcm.hh diff --git a/CHANGELOG.md b/CHANGELOG.md index 40cfdf9fc..a819d3207 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,9 @@ ## Deprecations and removals +- The deprecated headers `gcd.hh` and `lcm.hh` are removed. Use `std::gcd` + and `std::lcm` instead. + - Both deprecated macros `DUNE_DEPRECATED` and `DUNE_DEPRECATED_MSG(text)` are removed. Use C++14 attribute `[[deprecated]]`. However, be aware that it is no drop-in replacement, as it must be sometimes placed at diff --git a/dune/common/CMakeLists.txt b/dune/common/CMakeLists.txt index c47547fd2..4620fc154 100644 --- a/dune/common/CMakeLists.txt +++ b/dune/common/CMakeLists.txt @@ -52,7 +52,6 @@ install(FILES ftraits.hh function.hh fvector.hh - gcd.hh genericiterator.hh gmpfield.hh hash.hh @@ -64,7 +63,6 @@ install(FILES iteratorfacades.hh iteratorrange.hh keywords.hh - lcm.hh lru.hh mallocallocator.hh math.hh diff --git a/dune/common/gcd.hh b/dune/common/gcd.hh deleted file mode 100644 index ae13dbcd1..000000000 --- a/dune/common/gcd.hh +++ /dev/null @@ -1,27 +0,0 @@ -// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- -// vi: set et ts=4 sw=2 sts=2: -#ifndef DUNE_GCD_HH -#define DUNE_GCD_HH -#warning "This header is deprecated and will be removed after Dune release 2.8. Use std::gcd instead" - -#include <numeric> - -namespace Dune -{ - /** - * @brief Calculator of the greatest common divisor. - */ - template<long a, long b> - struct [[deprecated("Will be removed after Dune 2.8. Use std::gcd from <numeric> instead!")]] Gcd - { - /** - * @brief The greatest common divisior of a and b. */ - constexpr static long value = std::gcd(a,b); - }; - - /** - * @} - */ -} - -#endif diff --git a/dune/common/lcm.hh b/dune/common/lcm.hh deleted file mode 100644 index 4308fe260..000000000 --- a/dune/common/lcm.hh +++ /dev/null @@ -1,46 +0,0 @@ -// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- -// vi: set et ts=4 sw=2 sts=2: -#ifndef DUNE_LCM_HH -#define DUNE_LCM_HH - -#warning "This header is deprecated and will be removed after release 2.8. Use std::lcm instead." - -/** \file - * \brief Statically compute the least common multiple of two integers - */ - -#include <numeric> - -namespace Dune -{ - - /** - * @addtogroup Common - * @{ - */ - /** - * @file - * This file provides template constructs for calculation the - * least common multiple. - */ - - /** - * @brief Calculate the least common multiple of two numbers - */ - template<long m, long n> - struct [[deprecated("Will be removed after Dune 2.8. Use std::lcm instead.")]] Lcm - { - static void conceptCheck() - { - static_assert(0<m, "m must be positive!"); - static_assert(0<n, "n must be positive!"); - } - /** - * @brief The least common multiple of the template parameters - * m and n. - */ - constexpr static long value = std::lcm(m,n); - }; -} - -#endif -- GitLab