// Copyright (C) 2020-2023 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License along // with this library; see the file COPYING3. If not see // . // { dg-options "-std=gnu++2a" } // { dg-do compile { target c++2a } } #include #ifndef __cpp_lib_chrono # error "Feature test macro for chrono is missing in " // FIXME // #elif __cpp_lib_chrono < 201907L // # error "Feature test macro for chrono has wrong value in " #endif namespace __gnu_test { // Check for the new additions to in C++20 using std::chrono::is_clock; using std::chrono::is_clock_v; using std::chrono::days; using std::chrono::weeks; using std::chrono::years; using std::chrono::months; using std::chrono::sys_time; using std::chrono::sys_seconds; using std::chrono::sys_days; using std::chrono::utc_clock; using std::chrono::utc_time; using std::chrono::utc_seconds; using std::chrono::leap_second_info; using std::chrono::get_leap_second_info; using std::chrono::tai_clock; using std::chrono::tai_time; using std::chrono::tai_seconds; using std::chrono::gps_clock; using std::chrono::gps_time; using std::chrono::gps_seconds; using std::chrono::file_clock; using std::chrono::file_time; using std::chrono::local_t; using std::chrono::local_time; using std::chrono::local_seconds; using std::chrono::local_days; using std::chrono::clock_time_conversion; using std::chrono::clock_cast; using std::chrono::last_spec; using std::chrono::day; using std::chrono::month; using std::chrono::year; using std::chrono::weekday; using std::chrono::weekday_indexed; using std::chrono::weekday_last; using std::chrono::month_day; using std::chrono::month_day_last; using std::chrono::month_weekday; using std::chrono::month_weekday_last; using std::chrono::year_month; using std::chrono::year_month_day; using std::chrono::year_month_day_last; using std::chrono::year_month_weekday; using std::chrono::year_month_weekday_last; using std::chrono::year_month; using std::chrono::year_month_day; using std::chrono::hh_mm_ss; using std::chrono::is_am; using std::chrono::is_pm; using std::chrono::make12; using std::chrono::make24; #if _GLIBCXX_USE_CXX11_ABI using std::chrono::tzdb; using std::chrono::tzdb_list; using std::chrono::get_tzdb; using std::chrono::get_tzdb_list; using std::chrono::locate_zone; using std::chrono::current_zone; using std::chrono::reload_tzdb; using std::chrono::remote_version; using std::chrono::nonexistent_local_time; using std::chrono::ambiguous_local_time; using std::chrono::sys_info; using std::chrono::local_info; using std::chrono::choose; using std::chrono::time_zone; using std::chrono::zoned_traits; using std::chrono::zoned_time; using std::chrono::zoned_seconds; using std::chrono::leap_second; using std::chrono::time_zone_link; #endif using std::chrono::local_time_format; // FIXME // using std::chrono::parse; using std::chrono::last; using std::chrono::Sunday; using std::chrono::Monday; using std::chrono::Tuesday; using std::chrono::Wednesday; using std::chrono::Thursday; using std::chrono::Friday; using std::chrono::Saturday; using std::chrono::January; using std::chrono::February; using std::chrono::March; using std::chrono::April; using std::chrono::May; using std::chrono::June; using std::chrono::July; using std::chrono::August; using std::chrono::September; using std::chrono::October; using std::chrono::November; using std::chrono::December; using std::chrono_literals::operator""d; using std::chrono_literals::operator""y; template constexpr bool is_duration = false; template constexpr bool is_duration> = true; static_assert( is_duration ); static_assert( is_duration ); static_assert( is_duration ); static_assert( is_duration ); template constexpr bool has_period = std::is_same_v; using std::ratio; using std::ratio_multiply; using std::ratio_divide; using std::chrono::hours; static_assert( has_period, hours::period>> ); static_assert( has_period, days::period>> ); static_assert( has_period, days::period>> ); static_assert( has_period>> ); template constexpr bool is_time_point = false; template constexpr bool is_time_point> = true; static_assert( is_time_point> ); static_assert( is_time_point ); static_assert( is_time_point ); static_assert( std::is_class_v ); static_assert( is_time_point> ); static_assert( is_time_point ); static_assert( is_time_point ); static_assert( std::is_class_v ); static_assert( is_time_point> ); }