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 tzdb_list;
18 //
19 // const_iterator erase_after(const_iterator p);
20 //
21 // [time.zone.db.list]/5
22 //   Preconditions: The iterator following p is dereferenceable.
23 //
24 // Since there is no Standard way to create a second entry it's not
25 // possible to fulfill this precondition. This is tested in a libc++
26 // specific test.
27 
28 #include <chrono>
29 #include <concepts>
30 
31 std::chrono::tzdb_list& list = std::chrono::get_tzdb_list();
32 static_assert(std::same_as<decltype(list.erase_after(std::chrono::tzdb_list::const_iterator{})),
33                            std::chrono::tzdb_list::const_iterator>);
34