:: [Libbitcoin] bool cast operator and…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Police Terror
Date:  
À: libbitcoin
Sujet: [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).