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

Ville Voutilainen ville.voutilainen@gmail.com
Thu Mar 13 22:04:38 GMT 2025


On Fri, 14 Mar 2025 at 00:03, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
>
> On Thu, 13 Mar 2025 at 23:57, Jonathan Wakely <jwakely@redhat.com> wrote:
> > > Do we also want to constraint the tuple(const _Elements&...)
> > > constructor with requires sizeof...(_Elements) >= 1, which is present
> > > on the C++17 version?
> >
> > Oh we don't need that constraint, because we have an explicit
> > specialization for tuple<>.
>
> Are.. ..you sure? What about CTAD? That will look into the primary
> template only, and will perform its madness based on that
> and nothing else.

Oh, but CTAD would fail if there's no arguments passed.

So.. maybe we never needed that constraint, and the only reason I
added it was not trusting my (or anyone else's) understanding
of partial ordering and overload resolution.


More information about the Libstdc++ mailing list