33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 33c8f46a28fb80144cf6d5a01352de0ef8474880 Mon Sep 17 00:00:00 2001
|
|
From: John Zimmermann <johnz@posteo.net>
|
|
Date: Tue, 29 Jan 2019 13:59:16 +0100
|
|
Subject: [PATCH] Fix compiling of tests on gcc8.2
|
|
|
|
```
|
|
In file included from tests.cpp:32:
|
|
tests.cpp: In function 'void ____C_A_T_C_H____T_E_S_T____114()':
|
|
tests.cpp:1094:48: error: catching polymorphic type 'class std::bad_function_call' by value [-Werror=catch-value=]
|
|
CHECK_THROWS_AS(tmpl.render(dat), std::bad_function_call);
|
|
^~~~~~~~~~~~~~~~~
|
|
cc1plus: all warnings being treated as error
|
|
```
|
|
---
|
|
tests.cpp | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git tests.cpp tests.cpp
|
|
index a9176b7..276f0b3 100644
|
|
--- tests.cpp
|
|
+++ tests.cpp
|
|
@@ -1091,7 +1091,7 @@ TEST_CASE("custom_escape") {
|
|
mustache::escape_handler esc;
|
|
tmpl.set_custom_escape(esc);
|
|
object dat({ {"what", "\"friend\""} });
|
|
- CHECK_THROWS_AS(tmpl.render(dat), std::bad_function_call);
|
|
+ CHECK_THROWS_AS(tmpl.render(dat), std::bad_function_call&);
|
|
}
|
|
|
|
}
|
|
--
|
|
2.20.1
|
|
|