From e993b7973510449147db9ac630bff95197a03aff Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 23 Feb 2024 09:57:26 -0500 Subject: Allow variadic instances of Debug, e.g. to display arguments. All Debug constructor args are concatenated using stringize(). --- indra/test/debug.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/test/debug.h b/indra/test/debug.h index 76dbb973b2..162cd3da64 100644 --- a/indra/test/debug.h +++ b/indra/test/debug.h @@ -30,6 +30,7 @@ #define LL_DEBUG_H #include "print.h" +#include "stringize.h" /***************************************************************************** * Debugging stuff @@ -52,8 +53,9 @@ class Debug { public: - Debug(const std::string& block): - mBlock(block), + template + Debug(ARGS&&... args): + mBlock(stringize(std::forward(args)...)), mLOGTEST(getenv("LOGTEST")), // debug output enabled when LOGTEST is set AND non-empty mEnabled(mLOGTEST && *mLOGTEST) -- cgit v1.2.3