//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // No member named `leapsecond'. // XFAIL: LLVM-LIBC-FIXME // REQUIRES: std-at-least-c++26 // // Test that provides all of the hash specializations. #include #include #include "poisoned_hash_helper.h" #include "test_macros.h" static_assert(std::is_nothrow_invocable_v, std::chrono::day>); static_assert(std::is_nothrow_invocable_v, std::chrono::month>); static_assert(std::is_nothrow_invocable_v, std::chrono::year>); static_assert(std::is_nothrow_invocable_v, std::chrono::weekday>); static_assert(std::is_nothrow_invocable_v, std::chrono::weekday_indexed>); static_assert(std::is_nothrow_invocable_v, std::chrono::weekday_last>); static_assert(std::is_nothrow_invocable_v, std::chrono::month_day>); static_assert(std::is_nothrow_invocable_v, std::chrono::month_day_last>); static_assert(std::is_nothrow_invocable_v, std::chrono::month_weekday>); static_assert(std::is_nothrow_invocable_v, std::chrono::month_weekday_last>); static_assert(std::is_nothrow_invocable_v, std::chrono::year_month>); static_assert(std::is_nothrow_invocable_v, std::chrono::year_month_day>); static_assert( std::is_nothrow_invocable_v, std::chrono::year_month_day_last>); static_assert(std::is_nothrow_invocable_v, std::chrono::year_month_weekday>); static_assert( std::is_nothrow_invocable_v, std::chrono::year_month_weekday_last>); #ifndef TEST_HAS_NO_EXPERIMENTAL_TZDB static_assert(std::is_nothrow_invocable_v, std::chrono::leap_second>); #endif // TEST_HAS_NO_EXPERIMENTAL_TZDB int main(int, char**) { test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(); test_hash_enabled(std::chrono::weekday_last(std::chrono::weekday{})); test_hash_enabled(); test_hash_enabled(std::chrono::month_day_last(std::chrono::month{})); test_hash_enabled(std::chrono::month_weekday(std::chrono::month{}, std::chrono::weekday_indexed{})); test_hash_enabled( std::chrono::month_weekday_last(std::chrono::month{}, std::chrono::weekday_last(std::chrono::weekday{}))); test_hash_enabled(); test_hash_enabled(); test_hash_enabled( std::chrono::year_month_day_last(std::chrono::year{}, std::chrono::month_day_last(std::chrono::month{}))); test_hash_enabled(); test_hash_enabled(std::chrono::year_month_weekday_last( std::chrono::year{}, std::chrono::month{}, std::chrono::weekday_last(std::chrono::weekday{}))); #ifndef TEST_HAS_NO_EXPERIMENTAL_TZDB test_hash_enabled(std::chrono::leap_second({}, std::chrono::sys_seconds{}, std::chrono::seconds{})); # if !defined(TEST_HAS_NO_LOCALIZATION) && !defined(TEST_HAS_NO_TIME_ZONE_DATABASE) && !defined(TEST_HAS_NO_FILESYSTEM) test_hash_enabled>(); # endif // !defined(TEST_HAS_NO_LOCALIZATION) && !defined(TEST_HAS_NO_TIME_ZONE_DATABASE) && // !defined(TEST_HAS_NO_FILESYSTEM) #endif // TEST_HAS_NO_EXPERIMENTAL_TZDB return 0; }