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_link;
18
19// string_view target() const noexcept;
20
21#include <cassert>
22#include <chrono>
23#include <concepts>
24
25#include "test_macros.h"
26
27int main(int, const char**) {
28 const std::chrono::tzdb& tzdb = std::chrono::get_tzdb();
29 assert(tzdb.links.size() > 1);
30
31 [[maybe_unused]] std::same_as<std::string_view> auto _ = tzdb.links[0].target();
32 static_assert(noexcept(tzdb.links[0].target()));
33
34 return 0;
35}
36

source code of libcxx/test/std/time/time.zone/time.zone.link/time.zone.link.members/target.pass.cpp