Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Don't define tryTranslators function if exception are disabled

"-Wunused-function -Wall" produces if this function is defined when exceptions are disabled
Commit
ed4acded380ac5408acf9fa518984cbe1bbe25bd
Author
Vitalii Trubchaninov ·
Committer
Martin Hořeňovský
Parents
4acc51828f7f

Files · Download .tar.gz

Changes

 src/catch2/internal/catch_exception_translator_registry.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/catch2/internal/catch_exception_translator_registry.cpp b/src/catch2/internal/catch_exception_translator_registry.cpp
index f3d47c0c..103fc9ae 100644
--- a/src/catch2/internal/catch_exception_translator_registry.cpp
+++ b/src/catch2/internal/catch_exception_translator_registry.cpp
@@ -15,6 +15,7 @@
 
 namespace Catch {
 
+#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
     namespace {
         static std::string tryTranslators(
             std::vector<
@@ -28,6 +29,7 @@ namespace Catch {
         }
 
     }
+#endif //!defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
 
     ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() {
     }