From d953813f716ec03a864e80aa20cb948985ae0ec2 Mon Sep 17 00:00:00 2001 From: Luke Shingles Date: Mon, 11 Nov 2024 23:13:23 +0000 Subject: [PATCH] Update sn3d.h --- sn3d.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sn3d.h b/sn3d.h index e1afe5401..758699e1f 100644 --- a/sn3d.h +++ b/sn3d.h @@ -40,9 +40,9 @@ #ifdef ENABLE_STACKTRACE #include -#define STACKTRACEIFSUPPORTED std::stacktrace::current() +#define STACKTRACEIFSUPPORTED << std::stacktrace::current() << "\n" #else -#define STACKTRACEIFSUPPORTED "" +#define STACKTRACEIFSUPPORTED << "std::stacktrace not supported\n" #endif #ifdef STDPAR_ON @@ -136,13 +136,11 @@ __attribute__((__format__(__printf__, 1, 2))) inline auto printout(const char *f if (!assertpass) [[unlikely]] { \ if (output_file) { \ output_file << "\n[rank " << globals::my_rank << "] " << __FILE__ << ":" << __LINE__ << ": failed assertion `" \ - << #e << "` in function " << __PRETTY_FUNCTION__ << "\n" \ - << STACKTRACEIFSUPPORTED; \ + << #e << "` in function " << __PRETTY_FUNCTION__ << "\n" STACKTRACEIFSUPPORTED; \ output_file.flush(); \ } \ std::cerr << "\n[rank " << globals::my_rank << "] " << __FILE__ << ":" << __LINE__ << ": failed assertion `" \ - << #e << "` in function " << __PRETTY_FUNCTION__ << "\n" \ - << STACKTRACEIFSUPPORTED; \ + << #e << "` in function " << __PRETTY_FUNCTION__ << "\n" STACKTRACEIFSUPPORTED; \ } \ assert(assertpass); \ }