2020
2121#if __STDC_HOSTED__
2222#include < atomic>
23- #if __has_include(<format>)
23+ #include < version>
24+ #if __cpp_lib_format
2425#include < format>
25- #endif // __has_include(<format>)
26+ #endif // __cpp_lib_format
2627#endif // __STDC_HOSTED__
2728
2829#if __cpp_rtti >= 199711L
@@ -2125,7 +2126,7 @@ struct weak_conversion_dispatch : cast_dispatch_base<false, true> {
21252126template <class F >
21262127using weak_conversion_overload = weak_proxy<F>() const noexcept ;
21272128
2128- #if __STDC_HOSTED__ && __has_include(<format>)
2129+ #if __STDC_HOSTED__ && __cpp_lib_format
21292130template <class CharT >
21302131struct format_overload_traits ;
21312132template <>
@@ -2166,7 +2167,7 @@ struct format_dispatch {
21662167 return impl.format (self, fc);
21672168 }
21682169};
2169- #endif // __STDC_HOSTED__ && __has_include(<format>)
2170+ #endif // __STDC_HOSTED__ && __cpp_lib_format
21702171
21712172#if __cpp_rtti >= 199711L
21722173struct proxy_cast_context {
@@ -2273,7 +2274,7 @@ struct proxy_typeid_reflector {
22732274
22742275namespace skills {
22752276
2276- #if __STDC_HOSTED__ && __has_include(<format>)
2277+ #if __STDC_HOSTED__ && __cpp_lib_format
22772278template <class FB >
22782279using format =
22792280 typename FB::template add_convention<details::format_dispatch,
@@ -2283,7 +2284,7 @@ template <class FB>
22832284using wformat =
22842285 typename FB::template add_convention<details::format_dispatch,
22852286 details::format_overload_t <wchar_t >>;
2286- #endif // __STDC_HOSTED__ && __has_include(<format>)
2287+ #endif // __STDC_HOSTED__ && __cpp_lib_format
22872288
22882289#if __cpp_rtti >= 199711L
22892290template <class FB >
@@ -2604,7 +2605,7 @@ struct weak_dispatch : D {
26042605// == Adapters (std::formatter) ==
26052606// =============================================================================
26062607
2607- #if __STDC_HOSTED__ && __has_include(<format>)
2608+ #if __STDC_HOSTED__ && __cpp_lib_format
26082609namespace std {
26092610
26102611template <pro::v4::facade F, class CharT >
@@ -2635,7 +2636,7 @@ struct formatter<pro::v4::proxy_indirect_accessor<F>, CharT> {
26352636};
26362637
26372638} // namespace std
2638- #endif // __STDC_HOSTED__ && __has_include(<format>)
2639+ #endif // __STDC_HOSTED__ && __cpp_lib_format
26392640
26402641#undef PROD_UNREACHABLE
26412642#undef PROD_NO_UNIQUE_ADDRESS_ATTRIBUTE
0 commit comments