Avoid g++-8 -Wcatch-value warnings in the tests

Catch soci_error (and std::bad_cast in one place) by reference rather
than by value to avoid slicing -- even if it doesn't matter in the test
code, it still provokes the new g++-8 warning about it.

See #640.
This commit is contained in:
Vadim Zeitlin
2018-05-20 16:04:22 +02:00
parent c20f8842db
commit fcd1eec279
4 changed files with 17 additions and 17 deletions

View File

@@ -626,7 +626,7 @@ TEST_CASE("PostgreSQL JSON", "[postgresql][json]")
CHECK_THROWS_AS((
sql << "insert into soci_json_test (data) values(:data)",use(invalid_input)),
soci_error
soci_error&
);
}
else