Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
6d883f48
Commit
6d883f48
authored
3 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
Properly deprecate power.hh.
parent
d4ef4c20
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1076
Remove deprecated code parts or properly deprecate parts that were meant for removal
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+3
-0
3 additions, 0 deletions
CHANGELOG.md
dune/common/power.hh
+2
-0
2 additions, 0 deletions
dune/common/power.hh
dune/common/test/powertest.cc
+3
-0
3 additions, 0 deletions
dune/common/test/powertest.cc
with
8 additions
and
0 deletions
CHANGELOG.md
+
3
−
0
View file @
6d883f48
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
dune/common/power.hh
+
2
−
0
View file @
6d883f48
...
...
@@ -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
*/
...
...
This diff is collapsed.
Click to expand it.
dune/common/test/powertest.cc
+
3
−
0
View file @
6d883f48
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment