summaryrefslogtreecommitdiff
path: root/absl/time/internal/cctz/include
diff options
context:
space:
mode:
Diffstat (limited to 'absl/time/internal/cctz/include')
-rw-r--r--absl/time/internal/cctz/include/cctz/civil_time_detail.h6
-rw-r--r--absl/time/internal/cctz/include/cctz/time_zone.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/absl/time/internal/cctz/include/cctz/civil_time_detail.h b/absl/time/internal/cctz/include/cctz/civil_time_detail.h
index 5fe0967f..d7f72717 100644
--- a/absl/time/internal/cctz/include/cctz/civil_time_detail.h
+++ b/absl/time/internal/cctz/include/cctz/civil_time_detail.h
@@ -416,6 +416,12 @@ class civil_time {
return difference(T{}, lhs.f_, rhs.f_);
}
+ template <typename H>
+ friend H AbslHashValue(H h, civil_time a) {
+ return H::combine(std::move(h), a.f_.y, a.f_.m, a.f_.d,
+ a.f_.hh, a.f_.mm, a.f_.ss);
+ }
+
private:
// All instantiations of this template are allowed to call the following
// private constructor and access the private fields member.
diff --git a/absl/time/internal/cctz/include/cctz/time_zone.h b/absl/time/internal/cctz/include/cctz/time_zone.h
index c86a5552..f28dad17 100644
--- a/absl/time/internal/cctz/include/cctz/time_zone.h
+++ b/absl/time/internal/cctz/include/cctz/time_zone.h
@@ -224,6 +224,11 @@ class time_zone {
return !(lhs == rhs);
}
+ template <typename H>
+ friend H AbslHashValue(H h, time_zone tz) {
+ return H::combine(std::move(h), &tz.effective_impl());
+ }
+
class Impl;
private: