Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor 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
Development
openfoam
Commits
97bac477
Commit
97bac477
authored
11 years ago
by
laurence
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Tuple2: Remove comparison operators as friends and make non-members.
parent
0efac64b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/OpenFOAM/primitives/Tuple2/Tuple2.H
+9
-36
9 additions, 36 deletions
src/OpenFOAM/primitives/Tuple2/Tuple2.H
with
9 additions
and
36 deletions
src/OpenFOAM/primitives/Tuple2/Tuple2.H
+
9
−
36
View file @
97bac477
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -47,20 +47,6 @@ namespace Foam
template
<
class
Type1
,
class
Type2
>
class
Tuple2
;
template
<
class
Type1
,
class
Type2
>
inline
bool
operator
==
(
const
Tuple2
<
Type1
,
Type2
>&
,
const
Tuple2
<
Type1
,
Type2
>&
);
template
<
class
Type1
,
class
Type2
>
inline
bool
operator
!=
(
const
Tuple2
<
Type1
,
Type2
>&
,
const
Tuple2
<
Type1
,
Type2
>&
);
template
<
class
Type1
,
class
Type2
>
inline
Istream
&
operator
>>
(
Istream
&
,
Tuple2
<
Type1
,
Type2
>&
);
...
...
@@ -129,27 +115,6 @@ public:
return
s_
;
}
//- Return reverse pair
inline
Tuple2
<
Type2
,
Type1
>
reverseTuple2
()
const
{
return
Tuple2
<
Type2
,
Type1
>
(
second
(),
first
());
}
// Friend Operators
friend
bool
operator
==
<
Type1
,
Type2
>
(
const
Tuple2
<
Type1
,
Type2
>&
a
,
const
Tuple2
<
Type1
,
Type2
>&
b
);
friend
bool
operator
!=
<
Type1
,
Type2
>
(
const
Tuple2
<
Type1
,
Type2
>&
a
,
const
Tuple2
<
Type1
,
Type2
>&
b
);
// IOstream operators
...
...
@@ -169,6 +134,14 @@ public:
};
//- Return reverse of a tuple2
template
<
class
Type1
,
class
Type2
>
inline
Tuple2
<
Type2
,
Type1
>
reverse
(
const
Tuple2
<
Type1
,
Type2
>&
t
)
{
return
Tuple2
<
Type2
,
Type1
>
(
t
.
second
(),
t
.
first
());
}
template
<
class
Type1
,
class
Type2
>
inline
bool
operator
==
(
...
...
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