33#include < QSettings>
44#include < QVariant>
55#include < TGlobal>
6- #if __cplusplus >= 202002L && __has_include(<format>)
7- #include < format>
8- #endif
9- #include < tuple>
106
117class TSystemLogger ;
128class TAccessLog ;
@@ -25,7 +21,7 @@ T_CORE_EXPORT void writeAccessLog(const TAccessLog &log); // write access log
2521T_CORE_EXPORT void writeQueryLog (const QString &query, bool success, const QSqlError &error, int duration);
2622T_CORE_EXPORT void traceQuery (int duration, const std::string &msg);
2723
28- #if __cplusplus >= 202002L && __has_include(< format>)
24+ #if defined(__cpp_lib_format) // std:: format
2925
3026template <typename ... Args>
3127void traceQueryLog (int duration, const std::format_string<Args...> &fmt, Args&&... args)
@@ -57,7 +53,7 @@ enum SystemOpCode {
5753T_CORE_EXPORT QMap<QString, QVariant> settingsToMap (QSettings &settings, const QString &env = QString());
5854}
5955
60- #if __cplusplus >= 202002L && __has_include(< format>)
56+ #if defined(__cpp_lib_format) // std:: format
6157
6258template <typename ... Args>
6359void tSystemError (const std::format_string<Args...> &fmt, Args&&... args)
@@ -105,8 +101,8 @@ void tSystemInfo(const std::string &fmt, Args&&... args)
105101
106102#endif
107103
108- #if !defined( TF_NO_DEBUG)
109- #if __cplusplus >= 202002L && __has_include(< format>)
104+ #ifndef TF_NO_DEBUG
105+ #if defined(__cpp_lib_format) // std:: format
110106
111107template <typename ... Args>
112108void tSystemDebug (const std::format_string<Args...> &fmt, Args&&... args)
0 commit comments