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
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Timo Koch
dune-common
Commits
b8506f60
Commit
b8506f60
authored
9 years ago
by
Elias Pipping
Browse files
Options
Downloads
Patches
Plain Diff
Use std::enable_if<condition, int>::type =0
parent
b2edc8fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/common/densevector.hh
+12
-16
12 additions, 16 deletions
dune/common/densevector.hh
dune/common/typetraits.hh
+0
-1
0 additions, 1 deletion
dune/common/typetraits.hh
with
12 additions
and
17 deletions
dune/common/densevector.hh
+
12
−
16
View file @
b8506f60
...
...
@@ -603,10 +603,9 @@ namespace Dune {
}
//! infinity norm (maximum of absolute values of entries)
template
<
typename
vt
=
value_type
>
typename
std
::
enable_if
<!
has_nan
<
vt
>::
value
,
typename
FieldTraits
<
vt
>::
real_type
>::
type
infinity_norm
()
const
{
template
<
typename
vt
=
value_type
,
typename
std
::
enable_if
<!
has_nan
<
vt
>
::
value
,
int
>::
type
=
0
>
typename
FieldTraits
<
vt
>::
real_type
infinity_norm
()
const
{
using
real_type
=
typename
FieldTraits
<
vt
>::
real_type
;
using
std
::
abs
;
using
std
::
max
;
...
...
@@ -620,10 +619,9 @@ namespace Dune {
}
//! simplified infinity norm (uses Manhattan norm for complex values)
template
<
typename
vt
=
value_type
>
typename
std
::
enable_if
<!
has_nan
<
vt
>::
value
,
typename
FieldTraits
<
vt
>::
real_type
>::
type
infinity_norm_real
()
const
{
template
<
typename
vt
=
value_type
,
typename
std
::
enable_if
<!
has_nan
<
vt
>
::
value
,
int
>::
type
=
0
>
typename
FieldTraits
<
vt
>::
real_type
infinity_norm_real
()
const
{
using
real_type
=
typename
FieldTraits
<
vt
>::
real_type
;
using
std
::
max
;
...
...
@@ -636,10 +634,9 @@ namespace Dune {
}
//! infinity norm (maximum of absolute values of entries)
template
<
typename
vt
=
value_type
>
typename
std
::
enable_if
<
has_nan
<
vt
>::
value
,
typename
FieldTraits
<
vt
>::
real_type
>::
type
infinity_norm
()
const
{
template
<
typename
vt
=
value_type
,
typename
std
::
enable_if
<
has_nan
<
vt
>
::
value
,
int
>::
type
=
0
>
typename
FieldTraits
<
vt
>::
real_type
infinity_norm
()
const
{
using
real_type
=
typename
FieldTraits
<
vt
>::
real_type
;
using
std
::
abs
;
using
std
::
max
;
...
...
@@ -656,10 +653,9 @@ namespace Dune {
}
//! simplified infinity norm (uses Manhattan norm for complex values)
template
<
typename
vt
=
value_type
>
typename
std
::
enable_if
<
has_nan
<
vt
>::
value
,
typename
FieldTraits
<
vt
>::
real_type
>::
type
infinity_norm_real
()
const
{
template
<
typename
vt
=
value_type
,
typename
std
::
enable_if
<
has_nan
<
vt
>
::
value
,
int
>::
type
=
0
>
typename
FieldTraits
<
vt
>::
real_type
infinity_norm_real
()
const
{
using
real_type
=
typename
FieldTraits
<
vt
>::
real_type
;
using
std
::
max
;
...
...
This diff is collapsed.
Click to expand it.
dune/common/typetraits.hh
+
0
−
1
View file @
b8506f60
...
...
@@ -527,7 +527,6 @@ namespace Dune
static_assert
(
std
::
is_same
<
I
,
std
::
size_t
>::
value
,
"Your compiler is broken and does not support checking for arbitrary index types"
);
};
#endif // defined(DOXYGEN) or HAVE_IS_INDEXABLE_SUPPORT
...
...
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