[libcxx-commits] [libcxx] [libc++][chrono] Loads tzdata.zi in tzdb. (PR #74928)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 6 11:29:34 PST 2024


================
@@ -0,0 +1,104 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// For information see https://libcxx.llvm.org/DesignDocs/TimeZone.html
+
+#ifndef _LIBCPP_SRC_INCLUDE_TZDB_TZDB_LIST_H
+#define _LIBCPP_SRC_INCLUDE_TZDB_TZDB_LIST_H
+
+#include <__mutex/unique_lock.h>
+#include <forward_list>
+
+// When threads are not available the locking is not required.
+#ifndef _LIBCPP_HAS_NO_THREADS
+#  include <shared_mutex>
+#endif
+
+#include "types.h"
+#include "tz.h"
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace chrono {
+
+//===----------------------------------------------------------------------===//
+//                          Private API
+//===----------------------------------------------------------------------===//
+
+// The tzdb_list stores a list of "tzdb" enatries.
----------------
ldionne wrote:

```suggestion
// The tzdb_list stores a list of "tzdb" entries.
```

https://github.com/llvm/llvm-project/pull/74928


More information about the libcxx-commits mailing list