Update std::format check
This commit is contained in:
parent
08d831df5f
commit
a10e27a720
@ -8,9 +8,14 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#ifdef __cpp_lib_format
|
||||
#if __cplusplus >= 202002L
|
||||
#ifdef __has_include
|
||||
#if __has_include(<format>)
|
||||
#define CPPTRACE_STD_FORMAT
|
||||
#include <format>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#define CPPTRACE_API __declspec(dllexport)
|
||||
@ -249,7 +254,7 @@ namespace cpptrace {
|
||||
};
|
||||
}
|
||||
|
||||
#ifdef __cpp_lib_format
|
||||
#if defined(CPPTRACE_STD_FORMAT) && defined(__cpp_lib_format)
|
||||
template <>
|
||||
struct std::formatter<cpptrace::stacktrace_frame> : std::formatter<std::string> {
|
||||
auto format(cpptrace::stacktrace_frame frame, format_context& ctx) const {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user