diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp index 92229df7..aa17b561 100644 --- a/include/internal/catch_capture.hpp +++ b/include/internal/catch_capture.hpp @@ -136,7 +136,7 @@ static_cast(expr); \ __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ } \ - catch( exceptionType ) { \ + catch( exceptionType& ) { \ __catchResult.captureResult( Catch::ResultWas::Ok ); \ } \ catch( ... ) { \ diff --git a/projects/SelfTest/CompilationTests.cpp b/projects/SelfTest/CompilationTests.cpp index ed1978f3..30e08ba4 100644 --- a/projects/SelfTest/CompilationTests.cpp +++ b/projects/SelfTest/CompilationTests.cpp @@ -41,7 +41,7 @@ bool templated_tests(T t) { REQUIRE(a == t); CHECK(a == t); REQUIRE_THROWS(throws_int(true)); - CHECK_THROWS_AS(throws_int(true), const int&); + CHECK_THROWS_AS(throws_int(true), const int); REQUIRE_NOTHROW(throws_int(false)); REQUIRE_THAT("aaa", Catch::EndsWith("aaa")); return true;