25 Time library [time]

25.10 Time zones [time.zone]

25.10.2 Time zone database [time.zone.db]

25.10.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 constructors

    class 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
:
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 functions get_­tzdb(), locate_­zone(), and current_­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;
Returns: A reference to the first tzdb in the container.
Remarks: This operation is thread-safe with respect to reload_­tzdb().
[Note
:
reload_­tzdb() pushes a new tzdb onto the front of this container.
end note
]
const_iterator erase_after(const_iterator p);
Requires: The iterator following p is dereferenceable.
Effects: Erases the tzdb referred to by the iterator following p.
Returns: An iterator pointing to the element following the one that was erased, or end() if no such element exists.
Remarks: No pointers, references, or iterators are invalidated except those referring to the erased tzdb.
[Note
:
It is not possible to erase the tzdb referred to by begin().
end note
]
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().