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

redi@gcc.gnu.org redi@gcc.gnu.org
Mon Aug 12 14:54:00 GMT 2019


Author: redi
Date: Mon Aug 12 14:54:12 2019
New Revision: 274312

URL: https://gcc.gnu.org/viewcvs?rev=274312&root=gcc&view=rev
Log:
Add noexcept-specifier to std::apply and std::make_from_tuple

When unpacking a std::tuple we know that the std::get calls are
noexcept, so only the invocation (for std::apply) and construction (for
std::make_from_tuple) can throw.

We also know the std::get calls won't throw for a std::array, but this
patch doesn't specialize the variable template for std::array. For an
arbitrary tuple-like type we don't know if the std::get calls will
throw, and so just use a potentially-throwing noexcept-specifier.

	* include/std/tuple (__unpack_std_tuple): New variable template and
	partial specializations.
	(apply, make_from_tuple): Add noexcept-specifier.
	* testsuite/20_util/tuple/apply/2.cc: New test.
	* testsuite/20_util/tuple/make_from_tuple/2.cc: New test.

Added:
    trunk/libstdc++-v3/testsuite/20_util/tuple/apply/2.cc
    trunk/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/2.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/tuple



More information about the Libstdc++-cvs mailing list