[PATCH] libstdc++: Work around C++20 tuple<tuple<any>> constraint recursion [PR116440]

Ville Voutilainen ville.voutilainen@gmail.com
Thu Mar 13 21:23:18 GMT 2025


On Thu, 13 Mar 2025 at 23:14, Patrick Palka <ppalka@redhat.com> wrote:
> Ah, I just realized the C++17 tuple impl already defines the
> tuple(const _Elements&...) constructor as a template in order to
> constrain it!  So this patch arguably makes the C++20 constructor
> set more consistent with the C++17 impl, and so should be quite safe.

Right, but the C++17 tuple impl doesn't introduce additional template
parameter packs, it
introduces template parameters that have default values, so that
constructor (or two of them) certainly remains callable,
because the default arguments allow deduction to succeed.


More information about the Libstdc++ mailing list