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
6f1cbcf2
Commit
6f1cbcf2
authored
18 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
SameType --> is_same
[[Imported from SVN: r4853]]
parent
631bb204
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
common/exprtmpl.hh
+2
-2
2 additions, 2 deletions
common/exprtmpl.hh
common/helpertemplates.hh
+2
-2
2 additions, 2 deletions
common/helpertemplates.hh
with
4 additions
and
4 deletions
common/exprtmpl.hh
+
2
−
2
View file @
6f1cbcf2
...
...
@@ -1081,7 +1081,7 @@ namespace Dune {
typename
FieldType
<
A
>::
type
operator
*
(
const
Vector
<
A
>
&
a
,
const
Expression
<
B
>
&
b
)
{
IsTrue
<
SameTyp
e
<
FieldType
<
A
>
,
FieldType
<
B
>
>::
value
==
true
>::
yes
();
IsTrue
<
is_sam
e
<
FieldType
<
A
>
,
FieldType
<
B
>
>::
value
==
true
>::
yes
();
assert
(
a
.
N
()
==
b
.
N
());
typename
FieldType
<
A
>::
type
x
=
0
;
for
(
size_t
i
=
0
;
i
<
a
.
N
();
i
++
)
...
...
@@ -1094,7 +1094,7 @@ namespace Dune {
typename
FieldType
<
A
>::
type
operator
*
(
const
Expression
<
A
>
&
a
,
const
Vector
<
B
>
&
b
)
{
IsTrue
<
SameTyp
e
<
FieldType
<
A
>
,
FieldType
<
B
>
>::
value
==
true
>::
yes
();
IsTrue
<
is_sam
e
<
FieldType
<
A
>
,
FieldType
<
B
>
>::
value
==
true
>::
yes
();
assert
(
a
.
N
()
==
b
.
N
());
typename
FieldType
<
A
>::
type
x
=
0
;
for
(
size_t
i
=
0
;
i
<
a
.
N
();
i
++
)
...
...
This diff is collapsed.
Click to expand it.
common/helpertemplates.hh
+
2
−
2
View file @
6f1cbcf2
...
...
@@ -49,8 +49,8 @@ template<class T1, class T2, class T3 = T1> struct Can_multiply {
Example for compile time check whether two types are the same:
\code
IsTrue<
SameTyp
e<int,int>::value>::yes(); //
IsTrue<
SameTyp
e<bool,int>::value>::yes(); // false, will trigger a compile time error
IsTrue<
is_sam
e<int,int>::value>::yes(); //
IsTrue<
is_sam
e<bool,int>::value>::yes(); // false, will trigger a compile time error
\endcode
A test that trigger a compile time error if condition is true:
...
...
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