r270510 - in /trunk/libstdc++-v3: ChangeLog inc...

redi@gcc.gnu.org redi@gcc.gnu.org
Tue Apr 23 12:48:00 GMT 2019


Author: redi
Date: Tue Apr 23 12:48:28 2019
New Revision: 270510

URL: https://gcc.gnu.org/viewcvs?rev=270510&root=gcc&view=rev
Log:
Implement correct std::variant triviality rules from P0602R4

The std::variant move assignment operator should not be trivial if the
variant is not trivially move constructible.

	* include/std/variant (__detail::__variant::_Traits): Make
	_S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
	_S_trivial_move_assign depend on _S_trivial_move_ctor, as per
	P0602R4.
	(__detail::__variant::_Copy_assign_alias): Only depend on
	_S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
	* testsuite/20_util/variant/compile.cc: Correct checks for trivial
	move assignment operators.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/variant
    trunk/libstdc++-v3/testsuite/20_util/variant/compile.cc



More information about the Libstdc++-cvs mailing list