tmp/tmpwnw1s7bg/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Class `tzdb_list` <a id="time.zone.db.list">[[time.zone.db.list]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std::chrono {
|
| 5 |
+
class tzdb_list {
|
| 6 |
+
public:
|
| 7 |
+
tzdb_list(const tzdb_list&) = delete;
|
| 8 |
+
tzdb_list& operator=(const tzdb_list&) = delete;
|
| 9 |
+
|
| 10 |
+
// unspecified additional constructors
|
| 11 |
+
|
| 12 |
+
class const_iterator;
|
| 13 |
+
|
| 14 |
+
const tzdb& front() const noexcept;
|
| 15 |
+
|
| 16 |
+
const_iterator erase_after(const_iterator p);
|
| 17 |
+
|
| 18 |
+
const_iterator begin() const noexcept;
|
| 19 |
+
const_iterator end() const noexcept;
|
| 20 |
+
|
| 21 |
+
const_iterator cbegin() const noexcept;
|
| 22 |
+
const_iterator cend() const noexcept;
|
| 23 |
+
};
|
| 24 |
+
}
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
The `tzdb_list` database is a singleton; the unique object of type
|
| 28 |
+
`tzdb_list` can be accessed via the `get_tzdb_list()` function.
|
| 29 |
+
|
| 30 |
+
[*Note 1*: This access is only needed for those applications that need
|
| 31 |
+
to have long uptimes and have a need to update the time zone database
|
| 32 |
+
while running. Other applications can implicitly access the `front()` of
|
| 33 |
+
this list via the read-only namespace scope functions `get_tzdb()`,
|
| 34 |
+
`locate_zone()`, and `current_zone()`. — *end note*]
|
| 35 |
+
|
| 36 |
+
The `tzdb_list` object contains a list of `tzdb` objects.
|
| 37 |
+
|
| 38 |
+
`tzdb_list::const_iterator` is a constant iterator which meets the
|
| 39 |
+
*Cpp17ForwardIterator* requirements and has a value type of `tzdb`.
|
| 40 |
+
|
| 41 |
+
``` cpp
|
| 42 |
+
const tzdb& front() const noexcept;
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
*Synchronization:* This operation is thread-safe with respect to
|
| 46 |
+
`reload_tzdb()`.
|
| 47 |
+
|
| 48 |
+
[*Note 1*: `reload_tzdb()` pushes a new `tzdb` onto the front of this
|
| 49 |
+
container. — *end note*]
|
| 50 |
+
|
| 51 |
+
*Returns:* A reference to the first `tzdb` in the container.
|
| 52 |
+
|
| 53 |
+
``` cpp
|
| 54 |
+
const_iterator erase_after(const_iterator p);
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
*Preconditions:* The iterator following `p` is dereferenceable.
|
| 58 |
+
|
| 59 |
+
*Effects:* Erases the `tzdb` referred to by the iterator following `p`.
|
| 60 |
+
|
| 61 |
+
*Returns:* An iterator pointing to the element following the one that
|
| 62 |
+
was erased, or `end()` if no such element exists.
|
| 63 |
+
|
| 64 |
+
*Ensures:* No pointers, references, or iterators are invalidated except
|
| 65 |
+
those referring to the erased `tzdb`.
|
| 66 |
+
|
| 67 |
+
[*Note 2*: It is not possible to erase the `tzdb` referred to by
|
| 68 |
+
`begin()`. — *end note*]
|
| 69 |
+
|
| 70 |
+
*Throws:* Nothing.
|
| 71 |
+
|
| 72 |
+
``` cpp
|
| 73 |
+
const_iterator begin() const noexcept;
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
*Returns:* An iterator referring to the first `tzdb` in the container.
|
| 77 |
+
|
| 78 |
+
``` cpp
|
| 79 |
+
const_iterator end() const noexcept;
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
*Returns:* An iterator referring to the position one past the last
|
| 83 |
+
`tzdb` in the container.
|
| 84 |
+
|
| 85 |
+
``` cpp
|
| 86 |
+
const_iterator cbegin() const noexcept;
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
*Returns:* `begin()`.
|
| 90 |
+
|
| 91 |
+
``` cpp
|
| 92 |
+
const_iterator cend() const noexcept;
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
*Returns:* `end()`.
|
| 96 |
+
|