Add < operation to private_key to allow usage as an ordered key

This commit is contained in:
Vikram Rajkumar 2014-10-02 12:55:20 -04:00
parent c4e814d7de
commit 5fa3cb8632

View file

@ -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;
};