diff options
author | Benjamin Barenblat <bbaren@google.com> | 2023-09-07 13:16:09 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@google.com> | 2023-09-07 13:16:09 -0400 |
commit | 6fdbff8bbce2a1debdc060df381f39e3dcfb65af (patch) | |
tree | 71f1ef38477a65d5cce472fc042c90087c2bb351 /absl/time/internal/cctz/src/time_zone_if.h | |
parent | 8d4a80fe37176b1170d7dce0772dea9584ec3e32 (diff) | |
parent | 29bf8085f3bf17b84d30e34b3d7ff8248fda404e (diff) |
Merge new upstream LTS 20230802.0
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 |