Add comparison methods for content addresses

This commit is contained in:
John Ericson 2023-04-01 16:52:23 -04:00
parent c51d554c93
commit 5d56e2daf7

View file

@ -48,6 +48,8 @@ std::string makeFileIngestionPrefix(FileIngestionMethod m);
struct FixedOutputHashMethod {
FileIngestionMethod fileIngestionMethod;
HashType hashType;
GENERATE_CMP(FixedOutputHashMethod, me->fileIngestionMethod, me->hashType);
};
/**
@ -67,6 +69,8 @@ struct ContentAddressMethod
Raw raw;
GENERATE_CMP(ContentAddressMethod, me->raw);
/* The moral equivalent of `using Raw::Raw;` */
ContentAddressMethod(auto &&... arg)
: raw(std::forward<decltype(arg)>(arg)...)
@ -134,6 +138,8 @@ struct ContentAddress
Raw raw;
GENERATE_CMP(ContentAddress, me->raw);
/* The moral equivalent of `using Raw::Raw;` */
ContentAddress(auto &&... arg)
: raw(std::forward<decltype(arg)>(arg)...)
@ -229,6 +235,8 @@ struct ContentAddressWithReferences
Raw raw;
GENERATE_CMP(ContentAddressWithReferences, me->raw);
/* The moral equivalent of `using Raw::Raw;` */
ContentAddressWithReferences(auto &&... arg)
: raw(std::forward<decltype(arg)>(arg)...)