4.5 KiB
[time.zone.db.list]
30 Time library [time]
30.11 Time zones [time.zone]
30.11.2 Time zone database [time.zone.db]
30.11.2.2 Class tzdb_list [time.zone.db.list]
namespace std::chrono {class tzdb_list {public: tzdb_list(const tzdb_list&) = delete; tzdb_list& operator=(const tzdb_list&) = delete; // unspecified additional constructorsclass const_iterator; const tzdb& front() const noexcept;
const_iterator erase_after(const_iterator p);
const_iterator begin() const noexcept; const_iterator end() const noexcept;
const_iterator cbegin() const noexcept; const_iterator cend() const noexcept; };}
The tzdb_list database is a singleton; the unique object of type tzdb_list can be accessed via the get_tzdb_list() function.
[Note 1:
This access is only needed for those applications that need to have long uptimes and have a need to update the time zone database while running.
Other applications can implicitly access the front() of this list via the read-only namespace scope functionsget_tzdb(),locate_zone(), andcurrent_zone().
â end note]
The tzdb_list object contains a list of tzdb objects.
tzdb_list::const_iterator is a constant iterator which meets the Cpp17ForwardIterator requirements and has a value type of tzdb.
const tzdb& front() const noexcept;
Synchronization: This operation is thread-safe with respect to reload_tzdb().
[Note 2:
reload_tzdb() pushes a new tzdb onto the front of this container.
â end note]
Returns: A reference to the first tzdb in the container.
const_iterator erase_after(const_iterator p);
Preconditions: The iterator following p is dereferenceable.
Effects: Erases the tzdb referred to by the iterator following p.
Postconditions: No pointers, references, or iterators are invalidated except those referring to the erased tzdb.
[Note 3:
It is not possible to erase the tzdb referred to by begin().
â end note]
Returns: An iterator pointing to the element following the one that was erased, or end() if no such element exists.
Throws: Nothing.
const_iterator begin() const noexcept;
Returns: An iterator referring to the first tzdb in the container.
const_iterator end() const noexcept;
Returns: An iterator referring to the position one past the last tzdb in the container.
const_iterator cbegin() const noexcept;
Returns: begin().
const_iterator cend() const noexcept;
Returns: end().