We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1abb424 commit 8de5a69Copy full SHA for 8de5a69
core/include/prometheus/client_metric.h
@@ -16,12 +16,12 @@ struct PROMETHEUS_CPP_CORE_EXPORT ClientMetric {
16
std::string name;
17
std::string value;
18
19
- bool operator<(const Label& rhs) const {
20
- 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);
21
}
22
23
- bool operator==(const Label& rhs) const {
24
- 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);
25
26
};
27
std::vector<Label> label;
0 commit comments