libstdc++
std::chrono::tzdb_list Class Reference

Classes

class  const_iterator
 

Public Member Functions

 tzdb_list (const tzdb_list &)=delete
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
const_iterator end () const noexcept
 
const_iterator erase_after (const_iterator __p)
 
const tzdb & front () const noexcept
 
tzdb_listoperator= (const tzdb_list &)=delete
 

Friends

const tzdb & get_tzdb ()
 
tzdb_listget_tzdb_list ()
 
class leap_second
 
const tzdb & reload_tzdb ()
 
struct time_zone::_Impl
 
class time_zone_link
 
struct tzdb
 

Detailed Description

The list of chrono::tzdb objects

A single object of this type is constructed by the C++ runtime, and can be accessed by calling chrono::get_tzdb_list().

The front of the list is the current tzdb object and can be accessed via chrono::get_tzdb_list().front() or chrono::get_tzdb() or *chronoget_tzdb_list().begin().

The chrono::reload_tzdb() function will check for a newer version and if found, insert it at the front of the list.

Since
C++20

Definition at line 2696 of file chrono.

Member Function Documentation

◆ cbegin()

const_iterator std::chrono::tzdb_list::cbegin ( ) const
inlinenoexcept

Definition at line 2769 of file chrono.

◆ cend()

const_iterator std::chrono::tzdb_list::cend ( ) const
inlinenoexcept

Definition at line 2770 of file chrono.

◆ end()

const_iterator std::chrono::tzdb_list::end ( ) const
inlinenoexcept

Definition at line 2768 of file chrono.

◆ erase_after()

const_iterator std::chrono::tzdb_list::erase_after ( const_iterator  __p)

Remove the tzdb object after the one the iterator refers to.

Calling this function concurently with any of front(), begin(), or end() does not cause a data race, but in general this function is not thread-safe. The behaviour may be undefined if erasing an element from the list while another thread is calling the same function, or incrementing an iterator into the list, or accessing the element being erased (unless it is accessed through an iterator).

Parameters
__pA dereferenceable iterator.
Returns
An iterator the element after the one that was erased (or end() if there is no such element).
Since
C++20

◆ front()

const tzdb & std::chrono::tzdb_list::front ( ) const
noexcept

Access the current tzdb at the front of the list.

This returns a reference to the same object as chrono::get_tzdb().

Returns
A reference to the current tzdb object.
Since
C++20

Friends And Related Symbol Documentation

◆ leap_second

friend class leap_second
friend

Definition at line 2779 of file chrono.

◆ time_zone::_Impl

friend struct time_zone::_Impl
friend

Definition at line 2780 of file chrono.

◆ time_zone_link

friend class time_zone_link
friend

Definition at line 2781 of file chrono.

◆ tzdb

friend struct tzdb
friend

Definition at line 2778 of file chrono.


The documentation for this class was generated from the following file: