mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-30 01:26:15 +02:00
Add comparison methods for content addresses
This commit is contained in:
parent
c51d554c93
commit
5d56e2daf7
1 changed files with 10 additions and 2 deletions
|
@ -48,6 +48,8 @@ std::string makeFileIngestionPrefix(FileIngestionMethod m);
|
||||||
struct FixedOutputHashMethod {
|
struct FixedOutputHashMethod {
|
||||||
FileIngestionMethod fileIngestionMethod;
|
FileIngestionMethod fileIngestionMethod;
|
||||||
HashType hashType;
|
HashType hashType;
|
||||||
|
|
||||||
|
GENERATE_CMP(FixedOutputHashMethod, me->fileIngestionMethod, me->hashType);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,6 +69,8 @@ struct ContentAddressMethod
|
||||||
|
|
||||||
Raw raw;
|
Raw raw;
|
||||||
|
|
||||||
|
GENERATE_CMP(ContentAddressMethod, me->raw);
|
||||||
|
|
||||||
/* The moral equivalent of `using Raw::Raw;` */
|
/* The moral equivalent of `using Raw::Raw;` */
|
||||||
ContentAddressMethod(auto &&... arg)
|
ContentAddressMethod(auto &&... arg)
|
||||||
: raw(std::forward<decltype(arg)>(arg)...)
|
: raw(std::forward<decltype(arg)>(arg)...)
|
||||||
|
@ -134,6 +138,8 @@ struct ContentAddress
|
||||||
|
|
||||||
Raw raw;
|
Raw raw;
|
||||||
|
|
||||||
|
GENERATE_CMP(ContentAddress, me->raw);
|
||||||
|
|
||||||
/* The moral equivalent of `using Raw::Raw;` */
|
/* The moral equivalent of `using Raw::Raw;` */
|
||||||
ContentAddress(auto &&... arg)
|
ContentAddress(auto &&... arg)
|
||||||
: raw(std::forward<decltype(arg)>(arg)...)
|
: raw(std::forward<decltype(arg)>(arg)...)
|
||||||
|
@ -229,6 +235,8 @@ struct ContentAddressWithReferences
|
||||||
|
|
||||||
Raw raw;
|
Raw raw;
|
||||||
|
|
||||||
|
GENERATE_CMP(ContentAddressWithReferences, me->raw);
|
||||||
|
|
||||||
/* The moral equivalent of `using Raw::Raw;` */
|
/* The moral equivalent of `using Raw::Raw;` */
|
||||||
ContentAddressWithReferences(auto &&... arg)
|
ContentAddressWithReferences(auto &&... arg)
|
||||||
: raw(std::forward<decltype(arg)>(arg)...)
|
: raw(std::forward<decltype(arg)>(arg)...)
|
||||||
|
|
Loading…
Reference in a new issue