We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7081d06 commit 16f6a1dCopy full SHA for 16f6a1d
1 file changed
test/helper.hpp
@@ -17,7 +17,7 @@ void assert_equal(const T& left, const U& right, const std::source_location& loc
17
}
18
19
template<typename T>
20
-void assert_exception(std::function<void(void)> code, std::optional<std::string_view> message = std::nullopt) {
+void assert_exception(const std::function<void(void)>& code, std::optional<std::string_view> message = std::nullopt) {
21
std::optional<T> exception;
22
try {
23
code();
0 commit comments