Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
bbf32f49
Commit
bbf32f49
authored
Feb 22, 2019
by
Praetorius, Simon
Browse files
bug in min/max implementation with fold expressions resolved
parent
0cdb5281
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/amdis/common/Math.hpp
View file @
bbf32f49
...
...
@@ -47,7 +47,6 @@ namespace AMDiS
return
a
<
b
?
a
:
b
;
}
#ifndef AMDIS_HAS_CXX_FOLD_EXPRESSIONS
template
<
class
T0
>
constexpr
T0
min
(
T0
a
)
{
...
...
@@ -59,14 +58,6 @@ namespace AMDiS
{
return
min
(
a
,
min
(
ts
...));
}
#else
template
<
class
T0
,
class
...
Ts
>
constexpr
auto
min
(
T0
a
,
Ts
...
ts
)
{
std
::
common_type_t
<
T0
,
Ts
...
>
result
=
a
;
return
(
result
=
min
(
result
,
ts
),
...);
}
#endif
/// @}
...
...
@@ -80,7 +71,6 @@ namespace AMDiS
return
a
<
b
?
b
:
a
;
}
#ifndef AMDIS_HAS_CXX_FOLD_EXPRESSIONS
template
<
class
T0
>
constexpr
T0
max
(
T0
a
)
{
...
...
@@ -92,14 +82,6 @@ namespace AMDiS
{
return
max
(
a
,
max
(
ts
...));
}
#else
template
<
class
T0
,
class
...
Ts
>
constexpr
auto
max
(
T0
a
,
Ts
...
ts
)
{
std
::
common_type_t
<
T0
,
Ts
...
>
result
=
a
;
return
(
result
=
max
(
result
,
ts
),
...);
}
#endif
/// @}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment