Avoid -Wcatch-value warning in testsuite

* testsuite/20_util/variant/run.cc: Catch exception by reference to
	prevent -Wcatch-value warning.

From-SVN: r270527
This commit is contained in:
Jonathan Wakely 2019-04-24 00:17:52 +01:00 committed by Jonathan Wakely
parent 9588a07c96
commit e0657c24ae
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2019-04-24 Jonathan Wakely <jwakely@redhat.com>
* testsuite/20_util/variant/run.cc: Catch exception by reference to
prevent -Wcatch-value warning.
* include/std/variant (__variant_construct): Use template parameter
type instead of equivalent decltype-specifier.
(_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):

View File

@ -286,7 +286,7 @@ void emplace()
Vector::allocator_type::set_limit(0);
vv.emplace<2>(1, 1);
VERIFY(false);
} catch (__gnu_cxx::forced_error) {
} catch (const __gnu_cxx::forced_error&) {
}
VERIFY(vv.valueless_by_exception());
}