fix(Logger): Autodetect line number type from __LINE__ (#4553)

MS Visual Studio can use type long for __LINE__ macro when /ZI
compilation flag is used - https://learn.microsoft.com/en-us/cpp/build/
reference/z7-zi-zi-debug-information-format?view=msvc-170#zi-1
This breaks some poco interfaces, for ex. logger
We should fix type for line number
This commit is contained in:
Alexander B
2024-05-15 14:43:24 +03:00
committed by GitHub
parent ad72b25ace
commit 4552df2f2e
14 changed files with 83 additions and 73 deletions

View File

@@ -160,6 +160,16 @@ using namespace std::literals;
#define POCO_DEPRECATED
#endif
//
// MS Visual Studio can use type long for __LINE__ macro
// when /ZI compilation flag is used - https://learn.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-170#zi-1
// This breaks some poco interfaces, for ex. logger
// We should fix type for line number
namespace Poco {
using LineNumber = decltype(__LINE__);
}
//
// Pull in basic definitions