[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 13 09:49:58 PST 2024
================
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
+
+// XFAIL: libcpp-has-no-incomplete-tzdb
+// XFAIL: availability-tzdb-missing
+
+// <chrono>
+
+// class time_zone
+// {
+// time_zone(time_zone&&) = default;
+// time_zone& operator=(time_zone&&) = default;
+//
+// ...
+// };
+
+#include <chrono>
+#include <concepts>
+#include <type_traits>
+
+#include "test_macros.h"
+
+LIBCPP_STATIC_ASSERT(!std::copy_constructible<std::chrono::time_zone>);
----------------
ldionne wrote:
Let's add a comment saying that it's impossible to actually obtain a non-const reference to a time_zone, and as a result the move constructor can never be exercised in runtime code. We still check the property pedantically.
https://github.com/llvm/llvm-project/pull/74928
More information about the libcxx-commits
mailing list