Specify __cdecl for the terminate handler on MSVC, fixes #197

This commit is contained in:
Jeremy Rifkin 2024-12-30 23:07:15 -06:00
parent d5a2043fd3
commit 0c40839009
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4
2 changed files with 7 additions and 1 deletions

View File

@ -40,7 +40,7 @@ namespace cpptrace {
}
}
[[noreturn]] void terminate_handler() {
[[noreturn]] void MSVC_CDECL terminate_handler() {
// TODO: Support std::nested_exception?
try {
auto ptr = std::current_exception();

View File

@ -25,6 +25,12 @@
#define NODISCARD
#endif
#if IS_MSVC
#define MSVC_CDECL __cdecl
#else
#define MSVC_CDECL
#endif
namespace cpptrace {
namespace detail {
static const stacktrace_frame null_frame {