2323#if __has_include(<format>)
2424#include < format>
2525#endif // __has_include(<format>)
26+ #if __cpp_lib_format || (defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 170000)
27+ #define _PRO4D_HAS_FORMAT
28+ #endif // __cpp_lib_format || _LIBCPP_VERSION >= 170000
2629#endif // __STDC_HOSTED__
2730
2831#if __cpp_rtti >= 199711L
@@ -2125,7 +2128,7 @@ struct weak_conversion_dispatch : cast_dispatch_base<false, true> {
21252128template <class F >
21262129using weak_conversion_overload = weak_proxy<F>() const noexcept ;
21272130
2128- #if __STDC_HOSTED__ && __has_include(<format>)
2131+ #ifdef _PRO4D_HAS_FORMAT
21292132template <class CharT >
21302133struct format_overload_traits ;
21312134template <>
@@ -2166,7 +2169,7 @@ struct format_dispatch {
21662169 return impl.format (self, fc);
21672170 }
21682171};
2169- #endif // __STDC_HOSTED__ && __has_include(<format>)
2172+ #endif // _PRO4D_HAS_FORMAT
21702173
21712174#if __cpp_rtti >= 199711L
21722175struct proxy_cast_context {
@@ -2273,7 +2276,7 @@ struct proxy_typeid_reflector {
22732276
22742277namespace skills {
22752278
2276- #if __STDC_HOSTED__ && __has_include(<format>)
2279+ #ifdef _PRO4D_HAS_FORMAT
22772280template <class FB >
22782281using format =
22792282 typename FB::template add_convention<details::format_dispatch,
@@ -2283,7 +2286,7 @@ template <class FB>
22832286using wformat =
22842287 typename FB::template add_convention<details::format_dispatch,
22852288 details::format_overload_t <wchar_t >>;
2286- #endif // __STDC_HOSTED__ && __has_include(<format>)
2289+ #endif // _PRO4D_HAS_FORMAT
22872290
22882291#if __cpp_rtti >= 199711L
22892292template <class FB >
@@ -2604,7 +2607,7 @@ struct weak_dispatch : D {
26042607// == Adapters (std::formatter) ==
26052608// =============================================================================
26062609
2607- #if __STDC_HOSTED__ && __has_include(<format>)
2610+ #ifdef _PRO4D_HAS_FORMAT
26082611namespace std {
26092612
26102613template <pro::v4::facade F, class CharT >
@@ -2635,7 +2638,7 @@ struct formatter<pro::v4::proxy_indirect_accessor<F>, CharT> {
26352638};
26362639
26372640} // namespace std
2638- #endif // __STDC_HOSTED__ && __has_include(<format>)
2641+ #endif // _PRO4D_HAS_FORMAT
26392642
26402643#undef PROD_UNREACHABLE
26412644#undef PROD_NO_UNIQUE_ADDRESS_ATTRIBUTE
0 commit comments