diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-02-23 09:57:26 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-02-23 09:57:26 -0500 |
commit | e993b7973510449147db9ac630bff95197a03aff (patch) | |
tree | 3b3be40fc25324fe614e7348353d2989eb4e31bb | |
parent | d7e411d8fb355b7e4198c3521144e3fee2b8e62c (diff) |
Allow variadic instances of Debug, e.g. to display arguments.
All Debug constructor args are concatenated using stringize().
-rw-r--r-- | indra/test/debug.h | 6 |
1 files changed, 4 insertions, 2 deletions
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 <typename... ARGS> + Debug(ARGS&&... args): + mBlock(stringize(std::forward<ARGS>(args)...)), mLOGTEST(getenv("LOGTEST")), // debug output enabled when LOGTEST is set AND non-empty mEnabled(mLOGTEST && *mLOGTEST) |