Loading [MathJax]/extensions/tex2jax.js
DUNE
Distributed and Unified Numerics Environment
Dune Core Modules (unstable)
Toggle main menu visibility
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
_
a
b
d
f
g
h
i
l
o
p
q
t
v
w
+
Typedefs
a
b
c
d
f
g
h
i
l
m
o
r
s
t
u
v
Enumerations
+
Enumerator
a
b
d
f
g
i
o
r
t
u
Concepts
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
+
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
u
v
w
y
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Enumerations
+
Enumerator
b
c
e
f
g
i
l
n
o
p
r
s
u
v
+
Related Functions
b
c
f
h
l
o
r
s
+
Files
File List
+
File Members
+
All
c
d
f
k
t
Functions
Variables
Macros
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
dune
common
promotiontraits.hh
Go to the documentation of this file.
1
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
// vi: set et ts=4 sw=2 sts=2:
3
// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5
#ifndef DUNE_PROMOTIONTRAITS_HH
6
#define DUNE_PROMOTIONTRAITS_HH
7
8
#include <utility>
9
10
namespace
Dune
{
25
template
<
typename
T1,
typename
T2>
26
struct
PromotionTraits
27
{
28
typedef
decltype
(std::declval<T1>()+std::declval<T2>()) PromotedType;
29
};
30
31
// Specialization for the case of two equal types
32
// One should think that the generic template should handle this case as well.
33
// However, the fvectortest.cc unit test fails without it if ENABLE_GMP is set.
34
template
<
typename
T1>
35
struct
PromotionTraits
<T1,T1> {
typedef
T1 PromotedType; };
36
38
}
// end namespace
39
40
41
#endif
// DUNE_PROMOTIONTRAITS_HH
Dune
Dune namespace.
Definition:
alignedallocator.hh:13
Dune::PromotionTraits
Compute type of the result of an arithmetic operation involving two different number types.
Definition:
promotiontraits.hh:27
|
Legal Statements / Impressum
| Hosted by
TU Dresden
&
Uni Heidelberg
| generated with Hugo v0.111.3 (Mar 12, 23:28, 2025)