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 // Check that format functions aren't marked [[nodiscard]] when 10 // _LIBCPP_DISABLE_NODISCARD_EXT is defined 11 12 // UNSUPPORTED: c++03, c++11, c++14, c++17 13 // UNSUPPORTED: no-filesystem, no-localization, no-tzdb 14 15 // XFAIL: libcpp-has-no-incomplete-tzdb 16 // XFAIL: availability-tzdb-missing 17 18 // <chrono> 19 20 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_NODISCARD_EXT 21 22 #include <chrono> 23 24 #include "test_macros.h" 25 test()26void test() { 27 std::chrono::tzdb_list& list = std::chrono::get_tzdb_list(); 28 list.front(); 29 list.begin(); 30 list.end(); 31 list.cbegin(); 32 list.cend(); 33 34 std::chrono::get_tzdb_list(); 35 std::chrono::get_tzdb(); 36 std::chrono::remote_version(); 37 } 38