Skip to content

Commit

Permalink
chore(core): use hidden friends
Browse files Browse the repository at this point in the history
  • Loading branch information
gjasny committed Dec 27, 2023
1 parent 1abb424 commit dba1c7a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/include/prometheus/client_metric.h
Expand Up @@ -16,12 +16,12 @@ struct PROMETHEUS_CPP_CORE_EXPORT ClientMetric {
std::string name;
std::string value;

bool operator<(const Label& rhs) const {
return std::tie(name, value) < std::tie(rhs.name, rhs.value);
friend bool operator<(const Label& lhs, const Label& rhs) {
return std::tie(lhs.name, lhs.value) < std::tie(rhs.name, rhs.value);
}

bool operator==(const Label& rhs) const {
return std::tie(name, value) == std::tie(rhs.name, rhs.value);
friend bool operator==(const Label& lhs, const Label& rhs) {
return std::tie(lhs.name, lhs.value) == std::tie(rhs.name, rhs.value);
}
};
std::vector<Label> label;
Expand Down

0 comments on commit dba1c7a

Please sign in to comment.