Skip to content

Commit

Permalink
Work around clang/libc++ issue
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Dec 11, 2024
1 parent 82ec92f commit 7fe7f97
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/libfetchers/fetchers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ public:

bool operator ==(const Input & other) const noexcept;

auto operator <=>(const Input & other) const
bool operator <(const Input & other) const
{
return attrs <=> other.attrs;
return attrs < other.attrs;
}

bool contains(const Input & other) const;
Expand Down
5 changes: 4 additions & 1 deletion src/libflake/flake/flakeref.hh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ struct FlakeRef

bool operator ==(const FlakeRef & other) const = default;

auto operator <=>(const FlakeRef &) const = default;
bool operator <(const FlakeRef & other) const
{
return std::tie(input, subdir) < std::tie(other.input, other.subdir);
}

FlakeRef(fetchers::Input && input, const Path & subdir)
: input(std::move(input)), subdir(subdir)
Expand Down
5 changes: 4 additions & 1 deletion src/libutil/types.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ struct Explicit {

bool operator ==(const Explicit<T> & other) const = default;

auto operator <=>(const Explicit<T> & other) const = default;
bool operator <(const Explicit<T> & other) const
{
return t < other.t;
}
};


Expand Down

0 comments on commit 7fe7f97

Please sign in to comment.