Re: [PATCH] c++: naming a dependently-scoped template for CTAD [PR104641]

2022-03-11 Thread Jason Merrill via Gcc-patches
in make_typename_type? That works nicely too, like so? -- >8 -- Subject: [PATCH] c++: naming a dependently-scoped template for CTAD [PR104641] In order to be able to perform CTAD for a dependently-scoped template (such as A::B in the testcase below), we need to permit a typename-specifier to resolv

Re: [PATCH] c++: naming a dependently-scoped template for CTAD [PR104641]

2022-03-10 Thread Patrick Palka via Gcc-patches
we can get away with it. > > > @@ -16229,6 +16237,12 @@ tsubst (tree t, tree args, tsubst_flags_t complain, > > tree in_decl) > > } > > } > > + if (TREE_CODE (f) == TEMPLATE_DECL) > > + { > > + gcc_checking_assert (tst_ok);

Re: [PATCH] c++: naming a dependently-scoped template for CTAD [PR104641]

2022-03-09 Thread Jason Merrill via Gcc-patches
On 3/9/22 10:39, Patrick Palka wrote: On Tue, 8 Mar 2022, Jason Merrill wrote: On 3/2/22 14:32, Patrick Palka wrote: In order to be able to perform CTAD for a dependently-scoped template such as A::B in the testcase below, we need to permit a typename-specifier to resolve to a template as per

Re: [PATCH] c++: naming a dependently-scoped template for CTAD [PR104641]

2022-03-09 Thread Patrick Palka via Gcc-patches
On Tue, 8 Mar 2022, Jason Merrill wrote: > On 3/2/22 14:32, Patrick Palka wrote: > > In order to be able to perform CTAD for a dependently-scoped template > > such as A::B in the testcase below, we need to permit a > > typename-specifier to resolve to a template as per [dcl.type.simple]/2, > > at

Re: [PATCH] c++: naming a dependently-scoped template for CTAD [PR104641]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/2/22 14:32, Patrick Palka wrote: In order to be able to perform CTAD for a dependently-scoped template such as A::B in the testcase below, we need to permit a typename-specifier to resolve to a template as per [dcl.type.simple]/2, at least when it appears in a CTAD-enabled context. This pat

[PATCH] c++: naming a dependently-scoped template for CTAD [PR104641]

2022-03-02 Thread Patrick Palka via Gcc-patches
In order to be able to perform CTAD for a dependently-scoped template such as A::B in the testcase below, we need to permit a typename-specifier to resolve to a template as per [dcl.type.simple]/2, at least when it appears in a CTAD-enabled context. This patch implements this using a new tsubst fl