Skip to content

Commit 87e9962

Browse files
committed
Add missing operators
Signed-off-by: Emilio Cuesta <emiliocuesta@eprosima.com>
1 parent f67337a commit 87e9962

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

cpp_utils/include/cpp_utils/ReturnCode.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ class ReturnCode
6969
bool operator !=(
7070
const ReturnCode& c) const noexcept;
7171

72+
CPP_UTILS_DllAPI
73+
bool operator ==(
74+
const ReturnCodeValue& c) const noexcept;
75+
76+
CPP_UTILS_DllAPI
77+
bool operator !=(
78+
const ReturnCodeValue& c) const noexcept;
79+
7280
CPP_UTILS_DllAPI
7381
bool operator <(
7482
const ReturnCode& other) const noexcept;

cpp_utils/src/cpp/ReturnCode.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@ bool ReturnCode::operator !=(
7878
return value_ != c.value_;
7979
}
8080

81+
bool ReturnCode::operator ==(
82+
const ReturnCodeValue& c) const noexcept
83+
{
84+
return value_ == c;
85+
}
86+
87+
bool ReturnCode::operator !=(
88+
const ReturnCodeValue& c) const noexcept
89+
{
90+
return value_ != c;
91+
}
92+
8193
bool ReturnCode::operator <(
8294
const ReturnCode& other) const noexcept
8395
{

0 commit comments

Comments
 (0)