Add < operation to private_key to allow usage as an ordered key
This commit is contained in:
parent
c4e814d7de
commit
5fa3cb8632
1 changed files with 18 additions and 10 deletions
|
|
@ -109,11 +109,19 @@ namespace fc {
|
|||
|
||||
public_key get_public_key()const;
|
||||
|
||||
|
||||
inline friend bool operator==( const private_key& a, const private_key& b )
|
||||
{
|
||||
return a.get_secret() == b.get_secret();
|
||||
}
|
||||
inline friend bool operator!=( const private_key& a, const private_key& b )
|
||||
{
|
||||
return a.get_secret() != b.get_secret();
|
||||
}
|
||||
inline friend bool operator<( const private_key& a, const private_key& b )
|
||||
{
|
||||
return a.get_secret() < b.get_secret();
|
||||
}
|
||||
|
||||
private:
|
||||
fc::fwd<detail::private_key_impl,8> my;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue