Support compile-time format string checking with std::format (#2544)

* Support compile-time format string checking with std::format

* Fix pre-VS 17.5 compilation

* Fix compilation without wchar_t support

* What am I doing

* Bring back fmt optimization

* Move to_string_view to common.h

* Fix SPDLOG_CONSTEXPR_FUNC emitting duplicate symbol errors when building in C++11

* Also add inline on VS 2013

* Appender doesn't work on wide strings
This commit is contained in:
Charles Milette
2022-11-12 16:07:11 -05:00
committed by GitHub
parent c5a09ebc49
commit 4f80077339
8 changed files with 62 additions and 42 deletions

View File

@@ -82,8 +82,7 @@
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to use C++20 std::format instead of fmt. This removes compile
// time checking of format strings, but doesn't depend on the fmt library.
// Uncomment to use C++20 std::format instead of fmt.
//
// #define SPDLOG_USE_STD_FORMAT
///////////////////////////////////////////////////////////////////////////////