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

redi@gcc.gnu.org redi@gcc.gnu.org
Tue Sep 25 14:59:00 GMT 2018


Author: redi
Date: Tue Sep 25 14:59:16 2018
New Revision: 264574

URL: https://gcc.gnu.org/viewcvs?rev=264574&root=gcc&view=rev
Log:
PR libstdc++/87431 optimise valueless_by_exception()

If a std::variant can never get into valueless state then we don't need
to do a runtime check for a valid alternative.

	PR libstdc++/87431
	* include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
	Avoid runtime test when all alternatives are scalars and so cannot
	throw during initialization.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/variant



More information about the Libstdc++-cvs mailing list