Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorVitalii Trubchaninov2023-07-31 14:26:03 -0400
committerMartin Hořeňovský2023-08-04 15:28:55 +0200
commited4acded380ac5408acf9fa518984cbe1bbe25bd (patch)
treed6153517f676c5faf355729706581e84a5e40162 /src
parent4acc51828f7f93f3b2058a63f54d112af4034503 (diff)
downloadcatch3-ed4acded380ac5408acf9fa518984cbe1bbe25bd.tar.gz
Don't define tryTranslators function if exception are disabled
"-Wunused-function -Wall" produces if this function is defined when exceptions are disabled
Diffstat (limited to 'src')
-rw-r--r--src/catch2/internal/catch_exception_translator_registry.cpp2
1 files changed, 2 insertions, 0 deletions
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() {
}