Skip to content

Commit

Permalink
Fix build with C++20
Browse files Browse the repository at this point in the history
IB-8187

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma committed Oct 10, 2024
1 parent 2f17973 commit 9465a8b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions include/electronic-id/enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class CertificateType
bool isSigning() const { return value == SIGNING; }

constexpr bool operator==(const CertificateType other) const { return value == other.value; }
constexpr bool operator!=(const CertificateType other) const { return value != other.value; }
operator std::string() const;

private:
Expand Down Expand Up @@ -73,7 +72,6 @@ class HashAlgorithm
HashAlgorithm(const std::string&);

constexpr bool operator==(HashAlgorithmEnum other) const { return value == other; }
constexpr bool operator!=(HashAlgorithmEnum other) const { return value != other; }
constexpr operator HashAlgorithmEnum() const { return value; }

operator std::string() const;
Expand Down Expand Up @@ -146,14 +144,9 @@ class SignatureAlgorithm

constexpr bool operator==(HashAlgorithm other) const
{
return operator HashAlgorithm() == other;
}
constexpr bool operator!=(HashAlgorithm other) const
{
return operator HashAlgorithm() != other;
return other.operator ==(operator HashAlgorithm());
}
constexpr bool operator==(SignatureAlgorithmEnum other) const { return value == other; }
constexpr bool operator!=(SignatureAlgorithmEnum other) const { return value != other; }

constexpr operator HashAlgorithm() const
{
Expand Down Expand Up @@ -190,7 +183,6 @@ class JsonWebSignatureAlgorithm
}

constexpr bool operator==(JsonWebSignatureAlgorithmEnum other) const { return value == other; }
constexpr bool operator!=(JsonWebSignatureAlgorithmEnum other) const { return value != other; }
constexpr operator JsonWebSignatureAlgorithmEnum() const { return value; }

operator std::string() const;
Expand Down

0 comments on commit 9465a8b

Please sign in to comment.