Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tools
frackit
Commits
596294a1
Commit
596294a1
authored
Dec 07, 2020
by
Dennis Gläser
Browse files
[common][id] add inequality check
parent
537bc8e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
frackit/common/id.hh
View file @
596294a1
...
...
@@ -61,6 +61,12 @@ public:
bool
operator
==
(
const
Id
&
otherId
)
const
{
return
id_
==
otherId
.
get
();
}
/*!
* \brief Inequality check.
*/
bool
operator
!=
(
const
Id
&
otherId
)
const
{
return
id_
!=
otherId
.
get
();
}
private:
std
::
size_t
id_
;
};
...
...
frackit/python/common/id.hh
View file @
596294a1
...
...
@@ -34,6 +34,7 @@ void registerId(py::module& module)
cls
.
def
(
py
::
init
<
std
::
size_t
>
());
cls
.
def
(
"get"
,
&
Id
::
get
,
"return the id"
);
cls
.
def
(
py
::
self
==
Id
());
cls
.
def
(
py
::
self
!=
Id
());
cls
.
def
(
hash
(
py
::
self
));
}
...
...
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