1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 23:51:47 +02:00

WIP initial design

This commit is contained in:
Carlo Nucera 2020-06-30 14:10:30 -04:00
parent a1f66d1d9e
commit b798efb829
3 changed files with 19 additions and 10 deletions

View file

@ -40,13 +40,16 @@ struct Hash
is not present, then the hash type must be specified in the
string. */
Hash(std::string_view s, std::optional<HashType> type);
// type must be provided
Hash(std::string_view s, HashType type);
// hash type must be part of string
Hash(std::string_view s);
private:
// type must be provided, s must not include <type> prefix
Hash(std::string_view s, HashType type);
void init();
public:
/* Check whether a hash is set. */
operator bool () const { return (bool) type; }