ds in place because the tf_partial workaround is
necessary to
accept class-deduction93a.C below, and the tsubst workaround
is
necessary to accept class-deduction-92b.C below.
Whoops, forgot to git-add class-deduction93a.C:
-- >8 --
Subject: [PATCH] c++: CTAD within alias template [PR91911]
In t
t; really be 2).
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > For the other way around, if ConstSpanType is a
> > > > > > > > > >
tsubst workaround is
necessary to accept class-deduction-92b.C below.
Whoops, forgot to git-add class-deduction93a.C:
-- >8 --
Subject: [PATCH] c++: CTAD within alias template [PR91911]
In the first testcase below, during parsing of the alias template
ConstSpanType, transparency of alias tem
d, if ConstSpanType is a member
> > > > > > > > > > > template of
> > > > > > > > > > > say the class template B (and thus its level is greater
> > > > > > > > > > > than
> > > > > > &g
panType is a member
> > > > > > > > > > > template of
> > > > > > > > > > > say the class template B (and thus its level is greater
> > > > > > > > > > > than
> > > > > > > > > >
gt; > > > >
> > > > > > > > > > template
> > > > > > > > > > using SpanType = decltype(span(T()));
> > > > > > > > > >
> > > > > > > > > > template
>
sense.
Here's a patch that implements that. I reckon it's good to have both
workarounds in place because the tf_partial workaround is necessary to
accept class-deduction93a.C below, and the tsubst workaround is
necessary to accept class-deduction-92b.C below.
Whoops, forgot to git-add class-
template
> > >>>>>> struct B {
> > >>>>>>template
> > >>>>>>using ConstSpanType = span > >>>>>> SpanType::value_type>;
> > >>>>>> };
> > >>&g
pe = B::ConstSpanType;
> >>>>>>
> >>>>>> then tf_partial doesn't help here at all; we end up substituting 'int'
> >>>>>> for the CTAD placeholder... What it seems we need is to _increase_ the
> >>>>>>
93a.C below, and the tsubst workaround is
necessary to accept class-deduction-92b.C below.
Whoops, forgot to git-add class-deduction93a.C:
-- >8 --
Subject: [PATCH] c++: CTAD within alias template [PR91911]
In the first testcase below, during parsing of the alias template
ConstSpanTy
>>>> substitution..
> >>>>
> >>>> Hmm, rather than messing with tf_partial, which is apparently only a
> >>>> partial solution, maybe we should just make tsubst never substitute a
> >>>> CTAD placeholder -- they should always b
Makes sense.
Here's a patch that implements that. I reckon it's good to have both
workarounds in place because the tf_partial workaround is necessary to
accept class-deduction93a.C below, and the tsubst workaround is
necessary to accept class-deduction-92b.C below.
Whoops, forgot to
t.c
> > > index 5107bfbf9d1..dead651ed84 100644
> > > --- a/gcc/cp/pt.c
> > > +++ b/gcc/cp/pt.c
> > > @@ -15552,7 +15550,8 @@ tsubst (tree t, tree args, tsubst_flags_t
> > > complain,
> > > tree in_decl)
> > > levels
.c b/gcc/cp/pt.c
> > index 5107bfbf9d1..dead651ed84 100644
> > --- a/gcc/cp/pt.c
> > +++ b/gcc/cp/pt.c
> > @@ -15552,7 +15550,8 @@ tsubst (tree t, tree args, tsubst_flags_t complain,
> > tree in_decl)
> > levels = TMPL_ARGS_DEPTH (args);
> > i
On 6/25/21 1:11 PM, Patrick Palka wrote:
On Fri, 25 Jun 2021, Jason Merrill wrote:
On 6/24/21 4:45 PM, Patrick Palka wrote:
In the first testcase below, during parsing of the alias template
ConstSpanType, transparency of alias template specializations means we
replace SpanType with SpanType's
On Fri, 25 Jun 2021, Jason Merrill wrote:
> On 6/24/21 4:45 PM, Patrick Palka wrote:
> > In the first testcase below, during parsing of the alias template
> > ConstSpanType, transparency of alias template specializations means we
> > replace SpanType with SpanType's substituted definition. But th
On 6/24/21 4:45 PM, Patrick Palka wrote:
In the first testcase below, during parsing of the alias template
ConstSpanType, transparency of alias template specializations means we
replace SpanType with SpanType's substituted definition. But this
substitution lowers the level of the CTAD placeholde
In the first testcase below, during parsing of the alias template
ConstSpanType, transparency of alias template specializations means we
replace SpanType with SpanType's substituted definition. But this
substitution lowers the level of the CTAD placeholder for span(T()) from
2 to 1, and so the lat
18 matches
Mail list logo