Commit e0657c24 by Jonathan Wakely Committed by Jonathan Wakely

Avoid -Wcatch-value warning in testsuite

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

From-SVN: r270527
parent 9588a07c
2019-04-24 Jonathan Wakely <jwakely@redhat.com> 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 * include/std/variant (__variant_construct): Use template parameter
type instead of equivalent decltype-specifier. type instead of equivalent decltype-specifier.
(_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)): (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
......
...@@ -286,7 +286,7 @@ void emplace() ...@@ -286,7 +286,7 @@ void emplace()
Vector::allocator_type::set_limit(0); Vector::allocator_type::set_limit(0);
vv.emplace<2>(1, 1); vv.emplace<2>(1, 1);
VERIFY(false); VERIFY(false);
} catch (__gnu_cxx::forced_error) { } catch (const __gnu_cxx::forced_error&) {
} }
VERIFY(vv.valueless_by_exception()); VERIFY(vv.valueless_by_exception());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment