diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-10-01 02:09:43 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-10-01 02:09:43 -0400 |
commit | 6687baf7ba3d959f89b7787b0546a77a15d93e82 (patch) | |
tree | 874e55d2c992ccd09938e912fe0ae7a4e77db4db /asn.h | |
parent | fa6181f9505a7439fc5244ea63f2bc74df3620c3 (diff) | |
download | cryptopp-git-6687baf7ba3d959f89b7787b0546a77a15d93e82.tar.gz |
Add OID operator<= and operator>=
I thought the compiler was supposed to deduce these from operator== and operator<, but not for GCC 7.2
Diffstat (limited to 'asn.h')
-rw-r--r-- | asn.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -868,6 +868,10 @@ inline bool operator!=(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs) {return lhs.m_values != rhs.m_values;}
inline bool operator<(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs)
{return std::lexicographical_compare(lhs.m_values.begin(), lhs.m_values.end(), rhs.m_values.begin(), rhs.m_values.end());}
+inline bool operator<=(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs)
+ {return lhs<rhs || lhs==rhs;}
+inline bool operator>=(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs)
+ {return ! (lhs<rhs);}
inline ::CryptoPP::OID operator+(const ::CryptoPP::OID &lhs, unsigned long rhs)
{return ::CryptoPP::OID(lhs)+=rhs;}
inline std::ostream& operator<<(std::ostream& out, const OID &oid)
|