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
365ca384
Commit
365ca384
authored
4 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[cleanup] Deprecate lcm and advertise C++17 STL solution
parent
0c54202b
No related branches found
No related tags found
1 merge request
!825
[cleanup] Deprecate gcd/lcm, advertise C++17 STL solution
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/common/lcm.hh
+5
-3
5 additions, 3 deletions
dune/common/lcm.hh
with
5 additions
and
3 deletions
dune/common/lcm.hh
+
5
−
3
View file @
365ca384
...
...
@@ -3,11 +3,13 @@
#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
<
dune/common/gcd.hh
>
#include
<
numeric
>
namespace
Dune
{
...
...
@@ -26,7 +28,7 @@ namespace Dune
* @brief Calculate the least common multiple of two numbers
*/
template
<
long
m
,
long
n
>
struct
Lcm
struct
[[
deprecated
(
"Will be removed after Dune 2.8. Use std::lcm instead."
)]]
Lcm
{
static
void
conceptCheck
()
{
...
...
@@ -37,7 +39,7 @@ namespace Dune
* @brief The least common multiple of the template parameters
* m and n.
*/
const
static
long
value
=
(
m
/
Gcd
<
m
,
n
>::
value
)
*
n
;
const
expr
static
long
value
=
std
::
lcm
(
m
,
n
)
;
};
}
...
...
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