brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1007 B · 1f9b15e Raw
37 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++14, c++1710// UNSUPPORTED: no-filesystem, no-localization, no-tzdb11 12// XFAIL: libcpp-has-no-experimental-tzdb13// XFAIL: availability-tzdb-missing14 15// <chrono>16 17// class time_zone_link;18 19// string_view name()   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  std::same_as<std::string_view> auto name = tzdb.links[0].name();32  static_assert(noexcept(tzdb.links[0].name()));33  assert(name != tzdb.links[1].name());34 35  return 0;36}37