:: [Libbitcoin] bool cast operator and…
Top Page
Delete this message
Reply to this message
Author: Police Terror
Date:  
To: libbitcoin
Subject: [Libbitcoin] bool cast operator and equivalent method
There's lots of types in libbitcoin that have a bool cast operator but
no corresponding named method. Can I add these?

So for instance, <bitcoin/bitcoin/wallet/ek_token.hpp> defines:

operator const bool() const;

I would add:

bool is_valid() const;

I think every cast operator should have a corresponding named method,
and maybe cast operators should perhaps even be avoided because they
introduce ambiguity (but that's debatable).