lamarrr/STX

'unknown' SourceLocation with msvc

Closed this issue · 1 comments

When using SourceLocation, with stx::panic() for example, I get "unknown" for file_name, function_name, line and column.
__has_builtin is set to 0 but I can use __builtin_FILE(), __builtin_FUNCTION(), __builtin_LINE(), __builtin_COLUMN() in my program without any problem. It seems MSVC implemented __builtin_* but __has_builtin is not defined on that platform.

Since I am new to MSVC, I might have missed something in the compiler configuration.

I am running windows 10, building with cmake and using MSVC version 19.31.31105.0 with c++20.

Hi, sorry for closing this earlier, this has now been resolved in the main branch and is now working.
It's msvc's fault, I don't usually use windows and didn't get to test it until today.
thanks for notifying!