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

Properly deprecate power.hh.

parent d4ef4c20
Branches
Tags
1 merge request!1076Remove deprecated code parts or properly deprecate parts that were meant for removal
......@@ -48,6 +48,9 @@
and will be removed after Dune 2.9. Use `Communication` respectively
`getCommunication` instead.
- The header `power.hh` is deprecated. Use `Dune::power` from
`math.hh` instead.
# Release 2.8
- Set minimal required CMake version in cmake to >= 3.13.
......
......@@ -3,6 +3,8 @@
#ifndef DUNE_COMMON_POWER_HH
#define DUNE_COMMON_POWER_HH
#warning The header power.hh is deprecated. Use power from math.hh instead.
/** \file
\brief Various implementations of the power function for run-time and static arguments
*/
......
......@@ -5,6 +5,7 @@
#include <iostream>
#include <dune/common/deprecated.hh>
#include <dune/common/exceptions.hh>
#include <dune/common/math.hh>
#include <dune/common/power.hh>
......@@ -40,6 +41,7 @@ int main (int argc, char** argv) try
enum { dummy = power(2,2) };
// Test legacy power implementation
DUNE_NO_DEPRECATED_BEGIN
if (Power<0>::eval(4) != 1)
DUNE_THROW(MathError, "Power implementation does not compute the correct result");
......@@ -52,6 +54,7 @@ int main (int argc, char** argv) try
if (Power<3>::eval(4) != 64)
DUNE_THROW(MathError, "Power implementation does not compute the correct result");
DUNE_NO_DEPRECATED_END
return 0;
}
catch (Exception& e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment