[Bug libstdc++/94811] Please make make_tuple noexcept when possible
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 28 08:59:37 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94811
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Rafael Avila de Espindola from comment #0)
> So it should be possible to make the std::tuple constructor and
Isn't that already done?
> std::make_tuple noexcept when the arguments have noexcept copy or move
> constructors.
make_tuple should depend on the tuple being constructed, not on the individual
elements, because make_tuple is constructing a tuple, not constructing the
elements.
But I think this is slightly complicated by guaranteed copy elision in C++17.
For C++14 the make_tuple function depends on whether constructing the tuple can
throw *and* whether copying the return value can throw, for C++17 it only
depends on the former.
More information about the Gcc-bugs
mailing list