From 17f21df4413885b4a7f4e7ef9a0155958fe28ac8 Mon Sep 17 00:00:00 2001 From: Light <59169246+Light3039@users.noreply.github.com> Date: Fri, 19 Nov 2021 09:30:22 +0330 Subject: [PATCH] Fix(tweakme): SPDLOG_FUNCTION - Uncommenting SPDLOG_FUNCTION will make MSVC fail to compile: __PRETTY_FUNCTION__ is shown in intellisense but it's not available at compile time https://stackoverflow.com/questions/48857887/pretty-function-in-visual-c --- include/spdlog/tweakme.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/spdlog/tweakme.h b/include/spdlog/tweakme.h index 08f0f4e5..25113f0f 100644 --- a/include/spdlog/tweakme.h +++ b/include/spdlog/tweakme.h @@ -127,5 +127,9 @@ // __PRETTY_FUNCTION__ might be nicer in clang/gcc, and __FUNCTION__ in msvc. // Defaults to __FUNCTION__ (should work on all compilers) if not defined. // -// #define SPDLOG_FUNCTION __PRETTY_FUNCTION__ +// #ifdef __PRETTY_FUNCTION__ +// # define SPDLOG_FUNCTION __PRETTY_FUN CTION__ +// #else +// # define SPDLOG_FUNCTION __FUNCTION__ +// #endif ///////////////////////////////////////////////////////////////////////////////