diff options
author | Gennadiy Rozental <rogeeff@google.com> | 2023-06-27 17:22:39 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-06-27 17:24:09 -0700 |
commit | d65595c8dd994b47b7fdfdf9427bb546c577467b (patch) | |
tree | b28691c7a8d04c6236dfe9f1b17bf6ac3ca85310 /absl/time/internal/cctz/src/time_zone_if.h | |
parent | e6c09ae4b2acd421a29706f86e66eaa422262ad0 (diff) | |
download | abseil-d65595c8dd994b47b7fdfdf9427bb546c577467b.tar.gz abseil-d65595c8dd994b47b7fdfdf9427bb546c577467b.tar.bz2 abseil-d65595c8dd994b47b7fdfdf9427bb546c577467b.zip |
Import of CCTZ from GitHub.
PiperOrigin-RevId: 543896343
Change-Id: Ia91b3e082b764b750bbbe9a3ce63192263d51438
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 |