@@ -2234,6 +2234,13 @@ namespace __format
22342234 __format::__formatter_duration<_CharT> _M_f{__defSpec};
22352235 };
22362236
2237+ #if __glibcxx_print >= 202406L
2238+ template <typename _Rep, typename _Period>
2239+ constexpr bool
2240+ enable_nonlocking_formatter_optimization<chrono::duration<_Rep, _Period>>
2241+ = enable_nonlocking_formatter_optimization<_Rep>;
2242+ #endif
2243+
22372244 template <__format::__char _CharT>
22382245 struct formatter <chrono::day, _CharT>
22392246 {
@@ -2270,6 +2277,12 @@ namespace __format
22702277 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
22712278 };
22722279
2280+ #if __glibcxx_print >= 202406L
2281+ template <>
2282+ inline constexpr bool
2283+ enable_nonlocking_formatter_optimization<chrono::day> = true ;
2284+ #endif
2285+
22732286 template <__format::__char _CharT>
22742287 struct formatter <chrono::month, _CharT>
22752288 {
@@ -2308,6 +2321,12 @@ namespace __format
23082321 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
23092322 };
23102323
2324+ #if __glibcxx_print >= 202406L
2325+ template <>
2326+ inline constexpr bool
2327+ enable_nonlocking_formatter_optimization<chrono::month> = true ;
2328+ #endif
2329+
23112330 template <__format::__char _CharT>
23122331 struct formatter <chrono::year, _CharT>
23132332 {
@@ -2344,6 +2363,12 @@ namespace __format
23442363 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
23452364 };
23462365
2366+ #if __glibcxx_print >= 202406L
2367+ template <>
2368+ inline constexpr bool
2369+ enable_nonlocking_formatter_optimization<chrono::year> = true ;
2370+ #endif
2371+
23472372 template <__format::__char _CharT>
23482373 struct formatter <chrono::weekday, _CharT>
23492374 {
@@ -2382,6 +2407,12 @@ namespace __format
23822407 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
23832408 };
23842409
2410+ #if __glibcxx_print >= 202406L
2411+ template <>
2412+ inline constexpr bool
2413+ enable_nonlocking_formatter_optimization<chrono::weekday> = true ;
2414+ #endif
2415+
23852416 template <__format::__char _CharT>
23862417 struct formatter <chrono::weekday_indexed, _CharT>
23872418 {
@@ -2420,6 +2451,12 @@ namespace __format
24202451 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
24212452 };
24222453
2454+ #if __glibcxx_print >= 202406L
2455+ template <>
2456+ inline constexpr bool
2457+ enable_nonlocking_formatter_optimization<chrono::weekday_indexed> = true ;
2458+ #endif
2459+
24232460 template <__format::__char _CharT>
24242461 struct formatter <chrono::weekday_last, _CharT>
24252462 {
@@ -2458,6 +2495,12 @@ namespace __format
24582495 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
24592496 };
24602497
2498+ #if __glibcxx_print >= 202406L
2499+ template <>
2500+ inline constexpr bool
2501+ enable_nonlocking_formatter_optimization<chrono::weekday_last> = true ;
2502+ #endif
2503+
24612504 template <__format::__char _CharT>
24622505 struct formatter <chrono::month_day, _CharT>
24632506 {
@@ -2497,6 +2540,12 @@ namespace __format
24972540 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
24982541 };
24992542
2543+ #if __glibcxx_print >= 202406L
2544+ template <>
2545+ inline constexpr bool
2546+ enable_nonlocking_formatter_optimization<chrono::month_day> = true ;
2547+ #endif
2548+
25002549 template <__format::__char _CharT>
25012550 struct formatter <chrono::month_day_last, _CharT>
25022551 {
@@ -2535,6 +2584,12 @@ namespace __format
25352584 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
25362585 };
25372586
2587+ #if __glibcxx_print >= 202406L
2588+ template <>
2589+ inline constexpr bool
2590+ enable_nonlocking_formatter_optimization<chrono::month_day_last> = true ;
2591+ #endif
2592+
25382593 template <__format::__char _CharT>
25392594 struct formatter <chrono::month_weekday, _CharT>
25402595 {
@@ -2574,6 +2629,12 @@ namespace __format
25742629 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
25752630 };
25762631
2632+ #if __glibcxx_print >= 202406L
2633+ template <>
2634+ inline constexpr bool
2635+ enable_nonlocking_formatter_optimization<chrono::month_weekday> = true ;
2636+ #endif
2637+
25772638 template <__format::__char _CharT>
25782639 struct formatter <chrono::month_weekday_last, _CharT>
25792640 {
@@ -2613,6 +2674,12 @@ namespace __format
26132674 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
26142675 };
26152676
2677+ #if __glibcxx_print >= 202406L
2678+ template <>
2679+ inline constexpr bool
2680+ enable_nonlocking_formatter_optimization<chrono::month_weekday_last> = true ;
2681+ #endif
2682+
26162683 template <__format::__char _CharT>
26172684 struct formatter <chrono::year_month, _CharT>
26182685 {
@@ -2651,6 +2718,12 @@ namespace __format
26512718 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
26522719 };
26532720
2721+ #if __glibcxx_print >= 202406L
2722+ template <>
2723+ inline constexpr bool
2724+ enable_nonlocking_formatter_optimization<chrono::year_month> = true ;
2725+ #endif
2726+
26542727 template <__format::__char _CharT>
26552728 struct formatter <chrono::year_month_day, _CharT>
26562729 {
@@ -2693,6 +2766,12 @@ namespace __format
26932766 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
26942767 };
26952768
2769+ #if __glibcxx_print >= 202406L
2770+ template <>
2771+ inline constexpr bool
2772+ enable_nonlocking_formatter_optimization<chrono::year_month_day> = true ;
2773+ #endif
2774+
26962775 template <__format::__char _CharT>
26972776 struct formatter <chrono::year_month_day_last, _CharT>
26982777 {
@@ -2740,6 +2819,12 @@ namespace __format
27402819 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
27412820 };
27422821
2822+ #if __glibcxx_print >= 202406L
2823+ template <>
2824+ inline constexpr bool
2825+ enable_nonlocking_formatter_optimization<chrono::year_month_day_last> = true ;
2826+ #endif
2827+
27432828 template <__format::__char _CharT>
27442829 struct formatter <chrono::year_month_weekday, _CharT>
27452830 {
@@ -2795,6 +2880,12 @@ namespace __format
27952880 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
27962881 };
27972882
2883+ #if __glibcxx_print >= 202406L
2884+ template <>
2885+ inline constexpr bool
2886+ enable_nonlocking_formatter_optimization<chrono::year_month_weekday> = true ;
2887+ #endif
2888+
27982889 template <__format::__char _CharT>
27992890 struct formatter <chrono::year_month_weekday_last, _CharT>
28002891 {
@@ -2846,6 +2937,12 @@ namespace __format
28462937 __format::__formatter_chrono<_CharT> _M_f{__defSpec};
28472938 };
28482939
2940+ #if __glibcxx_print >= 202406L
2941+ template <>
2942+ inline constexpr bool
2943+ enable_nonlocking_formatter_optimization<chrono::year_month_weekday_last> = true ;
2944+ #endif
2945+
28492946 template <typename _Rep, typename _Period, __format::__char _CharT>
28502947 struct formatter <chrono::hh_mm_ss<chrono::duration<_Rep, _Period>>, _CharT>
28512948 {
@@ -2890,6 +2987,13 @@ namespace __format
28902987 __format::__formatter_duration<_CharT> _M_f{__defSpec};
28912988 };
28922989
2990+ #if __glibcxx_print >= 202406L
2991+ template <typename _Duration>
2992+ constexpr bool
2993+ enable_nonlocking_formatter_optimization<chrono::hh_mm_ss<_Duration>>
2994+ = true ;
2995+ #endif
2996+
28932997#if _GLIBCXX_USE_CXX11_ABI || ! _GLIBCXX_USE_DUAL_ABI
28942998 template <__format::__char _CharT>
28952999 struct formatter <chrono::sys_info, _CharT>
@@ -2908,6 +3012,12 @@ namespace __format
29083012 __format::__formatter_chrono_info<_CharT> _M_f;
29093013 };
29103014
3015+ #if __glibcxx_print >= 202406L
3016+ template <>
3017+ inline constexpr bool
3018+ enable_nonlocking_formatter_optimization<chrono::sys_info> = true ;
3019+ #endif
3020+
29113021 template <__format::__char _CharT>
29123022 struct formatter <chrono::local_info, _CharT>
29133023 {
@@ -2924,6 +3034,12 @@ namespace __format
29243034 private:
29253035 __format::__formatter_chrono_info<_CharT> _M_f;
29263036 };
3037+
3038+ #if __glibcxx_print >= 202406L
3039+ template <>
3040+ inline constexpr bool
3041+ enable_nonlocking_formatter_optimization<chrono::local_info> = true ;
3042+ #endif
29273043#endif
29283044
29293045 template <typename _Duration, __format::__char _CharT>
@@ -2962,6 +3078,13 @@ namespace __format
29623078 __format::__formatter_duration<_CharT> _M_f{__defSpec};
29633079 };
29643080
3081+ #if __glibcxx_print >= 202406L
3082+ template <typename _Duration>
3083+ constexpr bool
3084+ enable_nonlocking_formatter_optimization<chrono::sys_time<_Duration>>
3085+ = true ;
3086+ #endif
3087+
29653088 template <typename _Duration, __format::__char _CharT>
29663089 struct formatter <chrono::utc_time<_Duration>, _CharT>
29673090 {
@@ -3006,6 +3129,13 @@ namespace __format
30063129 __format::__formatter_duration<_CharT> _M_f{__defSpec};
30073130 };
30083131
3132+ #if __glibcxx_print >= 202406L
3133+ template <typename _Duration>
3134+ constexpr bool
3135+ enable_nonlocking_formatter_optimization<chrono::utc_time<_Duration>>
3136+ = true ;
3137+ #endif
3138+
30093139 template <typename _Duration, __format::__char _CharT>
30103140 struct formatter <chrono::tai_time<_Duration>, _CharT>
30113141 {
@@ -3041,6 +3171,13 @@ namespace __format
30413171 __format::__formatter_duration<_CharT> _M_f{__defSpec};
30423172 };
30433173
3174+ #if __glibcxx_print >= 202406L
3175+ template <typename _Duration>
3176+ constexpr bool
3177+ enable_nonlocking_formatter_optimization<chrono::tai_time<_Duration>>
3178+ = true ;
3179+ #endif
3180+
30443181 template <typename _Duration, __format::__char _CharT>
30453182 struct formatter <chrono::gps_time<_Duration>, _CharT>
30463183 {
@@ -3076,6 +3213,13 @@ namespace __format
30763213 __format::__formatter_duration<_CharT> _M_f{__defSpec};
30773214 };
30783215
3216+ #if __glibcxx_print >= 202406L
3217+ template <typename _Duration>
3218+ constexpr bool
3219+ enable_nonlocking_formatter_optimization<chrono::gps_time<_Duration>>
3220+ = true ;
3221+ #endif
3222+
30793223 template <typename _Duration, __format::__char _CharT>
30803224 struct formatter <chrono::file_time<_Duration>, _CharT>
30813225 {
@@ -3111,6 +3255,13 @@ namespace __format
31113255 __format::__formatter_duration<_CharT> _M_f{__defSpec};
31123256 };
31133257
3258+ #if __glibcxx_print >= 202406L
3259+ template <typename _Duration>
3260+ constexpr bool
3261+ enable_nonlocking_formatter_optimization<chrono::file_time<_Duration>>
3262+ = true ;
3263+ #endif
3264+
31143265 template <typename _Duration, __format::__char _CharT>
31153266 struct formatter <chrono::local_time<_Duration>, _CharT>
31163267 {
@@ -3145,6 +3296,13 @@ namespace __format
31453296 __format::__formatter_duration<_CharT> _M_f{__defSpec};
31463297 };
31473298
3299+ #if __glibcxx_print >= 202406L
3300+ template <typename _Duration>
3301+ constexpr bool
3302+ enable_nonlocking_formatter_optimization<chrono::local_time<_Duration>>
3303+ = true ;
3304+ #endif
3305+
31483306 template <typename _Duration, __format::__char _CharT>
31493307 struct formatter <chrono::__detail::__local_time_fmt<_Duration>, _CharT>
31503308 {
@@ -3205,6 +3363,13 @@ namespace __format
32053363 __format::__formatter_duration<_CharT> _M_f{__defSpec};
32063364 };
32073365
3366+ #if __glibcxx_print >= 202406L
3367+ template <typename _Duration>
3368+ constexpr bool
3369+ enable_nonlocking_formatter_optimization<
3370+ chrono::__detail::__local_time_fmt<_Duration>> = true ;
3371+ #endif
3372+
32083373#if _GLIBCXX_USE_CXX11_ABI || ! _GLIBCXX_USE_DUAL_ABI
32093374 template <typename _Duration, typename _TimeZonePtr, __format::__char _CharT>
32103375 struct formatter <chrono::zoned_time<_Duration, _TimeZonePtr>, _CharT>
@@ -3224,6 +3389,13 @@ namespace __format
32243389 return _Base::format (__lf, __fc);
32253390 }
32263391 };
3392+
3393+ #if __glibcxx_print >= 202406L
3394+ template <typename _Duration>
3395+ constexpr bool
3396+ enable_nonlocking_formatter_optimization<
3397+ chrono::zoned_time<_Duration, const chrono::time_zone*>> = true ;
3398+ #endif
32273399#endif
32283400
32293401namespace chrono
0 commit comments