12
12
13
13
#include < __config>
14
14
15
- #ifndef _LIBCPP_HAS_NO_LOCALIZATION
15
+ #if _LIBCPP_HAS_LOCALIZATION
16
16
17
17
# include < __algorithm/ranges_copy.h>
18
18
# include < __chrono/calendar.h>
@@ -143,8 +143,7 @@ __format_sub_seconds(basic_stringstream<_CharT>& __sstr, const chrono::hh_mm_ss<
143
143
__value.fractional_width );
144
144
}
145
145
146
- # if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && \
147
- !defined(_LIBCPP_HAS_NO_FILESYSTEM)
146
+ # if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
148
147
template <class _CharT , class _Duration , class _TimeZonePtr >
149
148
_LIBCPP_HIDE_FROM_ABI void
150
149
__format_sub_seconds (basic_stringstream<_CharT>& __sstr, const chrono::zoned_time<_Duration, _TimeZonePtr>& __value) {
@@ -156,8 +155,7 @@ template <class _Tp>
156
155
consteval bool __use_fraction () {
157
156
if constexpr (__is_time_point<_Tp>)
158
157
return chrono::hh_mm_ss<typename _Tp::duration>::fractional_width;
159
- # if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && \
160
- !defined (_LIBCPP_HAS_NO_FILESYSTEM)
158
+ # if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
161
159
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
162
160
return chrono::hh_mm_ss<typename _Tp::duration>::fractional_width;
163
161
# endif
@@ -232,7 +230,7 @@ _LIBCPP_HIDE_FROM_ABI __time_zone __convert_to_time_zone([[maybe_unused]] const
232
230
# if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
233
231
if constexpr (same_as<_Tp, chrono::sys_info>)
234
232
return {__value.abbrev , __value.offset };
235
- # if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
233
+ # if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
236
234
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
237
235
return __formatter::__convert_to_time_zone (__value.get_info ());
238
236
# endif
@@ -450,7 +448,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __weekday_ok(const _Tp& __value) {
450
448
return true ;
451
449
else if constexpr (same_as<_Tp, chrono::local_info>)
452
450
return true ;
453
- # if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
451
+ # if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
454
452
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
455
453
return true ;
456
454
# endif
@@ -500,7 +498,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __weekday_name_ok(const _Tp& __value) {
500
498
return true ;
501
499
else if constexpr (same_as<_Tp, chrono::local_info>)
502
500
return true ;
503
- # if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
501
+ # if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
504
502
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
505
503
return true ;
506
504
# endif
@@ -550,7 +548,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __date_ok(const _Tp& __value) {
550
548
return true ;
551
549
else if constexpr (same_as<_Tp, chrono::local_info>)
552
550
return true ;
553
- # if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
551
+ # if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
554
552
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
555
553
return true ;
556
554
# endif
@@ -600,7 +598,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __month_name_ok(const _Tp& __value) {
600
598
return true ;
601
599
else if constexpr (same_as<_Tp, chrono::local_info>)
602
600
return true ;
603
- # if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
601
+ # if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
604
602
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
605
603
return true ;
606
604
# endif
@@ -964,7 +962,7 @@ struct formatter<chrono::local_info, _CharT> : public __formatter_chrono<_CharT>
964
962
return _Base::__parse (__ctx, __format_spec::__fields_chrono, __format_spec::__flags{});
965
963
}
966
964
};
967
- # if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
965
+ # if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
968
966
// Note due to how libc++'s formatters are implemented there is no need to add
969
967
// the exposition only local-time-format-t abstraction.
970
968
template <class _Duration , class _TimeZonePtr , __fmt_char_type _CharT>
@@ -977,13 +975,13 @@ struct formatter<chrono::zoned_time<_Duration, _TimeZonePtr>, _CharT> : public _
977
975
return _Base::__parse (__ctx, __format_spec::__fields_chrono, __format_spec::__flags::__clock);
978
976
}
979
977
};
980
- # endif // !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
978
+ # endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
981
979
# endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
982
980
983
981
# endif // if _LIBCPP_STD_VER >= 20
984
982
985
983
_LIBCPP_END_NAMESPACE_STD
986
984
987
- #endif // !_LIBCPP_HAS_NO_LOCALIZATION
985
+ #endif // _LIBCPP_HAS_LOCALIZATION
988
986
989
987
#endif // _LIBCPP___CHRONO_FORMATTER_H
0 commit comments