Skip to content
Snippets Groups Projects
Commit 6845acf7 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

Remove deprecated lcm.hh and gcd.hh.

parent d1808ac7
No related branches found
No related tags found
1 merge request!1076Remove deprecated code parts or properly deprecate parts that were meant for removal
......@@ -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
......
......@@ -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
......
// -*- 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
// -*- 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment