diff options
author | Abseil Team <absl-team@google.com> | 2023-06-28 13:34:32 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-06-28 13:35:17 -0700 |
commit | 2119e40e17b56e38d077279fa7480b04d769d01d (patch) | |
tree | 8b2f0361dff2f703c5788fcdda2c30fd7079399e /absl/time/internal/cctz/src/time_zone_if.h | |
parent | bba65bd11506292aad0258ab516fe9eabf507e18 (diff) | |
download | abseil-2119e40e17b56e38d077279fa7480b04d769d01d.tar.gz abseil-2119e40e17b56e38d077279fa7480b04d769d01d.tar.bz2 abseil-2119e40e17b56e38d077279fa7480b04d769d01d.zip |
Roll forward of CCTZ update; fixed by clang release.
PiperOrigin-RevId: 544146637
Change-Id: I5ca44465f451956ae246081ce826891599b18b9c
Diffstat (limited to 'absl/time/internal/cctz/src/time_zone_if.h')
-rw-r--r-- | absl/time/internal/cctz/src/time_zone_if.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_if.h b/absl/time/internal/cctz/src/time_zone_if.h index 7d3e42d3..bec9beb5 100644 --- a/absl/time/internal/cctz/src/time_zone_if.h +++ b/absl/time/internal/cctz/src/time_zone_if.h @@ -33,8 +33,9 @@ namespace cctz { // Subclasses implement the functions for civil-time conversions in the zone. class TimeZoneIf { public: - // A factory function for TimeZoneIf implementations. - static std::unique_ptr<TimeZoneIf> Load(const std::string& name); + // Factory functions for TimeZoneIf implementations. + static std::unique_ptr<TimeZoneIf> UTC(); // never fails + static std::unique_ptr<TimeZoneIf> Make(const std::string& name); virtual ~TimeZoneIf(); @@ -51,7 +52,9 @@ class TimeZoneIf { virtual std::string Description() const = 0; protected: - TimeZoneIf() {} + TimeZoneIf() = default; + TimeZoneIf(const TimeZoneIf&) = delete; + TimeZoneIf& operator=(const TimeZoneIf&) = delete; }; // Convert between time_point<seconds> and a count of seconds since the |