1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9// UNSUPPORTED: c++03, c++11, c++14, c++17
10// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
11
12// XFAIL: libcpp-has-no-experimental-tzdb
13// XFAIL: availability-tzdb-missing
14
15// <chrono>
16
17// class time_zone
18// {
19// time_zone(time_zone&&) = default;
20// time_zone& operator=(time_zone&&) = default;
21//
22// ...
23// };
24
25#include <chrono>
26#include <concepts>
27#include <type_traits>
28
29#include "test_macros.h"
30
31// It's impossible to actually obtain a non-const reference to a time_zone, and
32// as a result the move constructor can never be exercised in runtime code. We
33// still check the property pedantically.
34LIBCPP_STATIC_ASSERT(!std::copy_constructible<std::chrono::time_zone>);
35LIBCPP_STATIC_ASSERT(!std::is_copy_assignable_v<std::chrono::time_zone>);
36static_assert(std::move_constructible<std::chrono::time_zone>);
37static_assert(std::is_move_assignable_v<std::chrono::time_zone>);
38

source code of libcxx/test/std/time/time.zone/time.zone.timezone/types.compile.pass.cpp