Re: [PATCH] c++: CTAD and explicit deduction guides for copy-list-init [PR90210]

2020-09-30 Thread Jason Merrill via Gcc-patches
On 9/19/20 5:33 PM, Marek Polacek wrote: This PR points out that we accept template struct tuple { tuple(T); }; // #1 template explicit tuple(T t) -> tuple; // #2 tuple t = { 1 }; despite the 'explicit' deduction guide in a copy-list-initialization context. That's because in deduction

Re: [PATCH] c++: CTAD and explicit deduction guides for copy-list-init [PR90210]

2020-09-29 Thread Marek Polacek via Gcc-patches
Ping. On Sat, Sep 19, 2020 at 05:33:36PM -0400, Marek Polacek via Gcc-patches wrote: > This PR points out that we accept > > template struct tuple { tuple(T); }; // #1 > template explicit tuple(T t) -> tuple; // #2 > tuple t = { 1 }; > > despite the 'explicit' deduction guide in a copy-lis

[PATCH] c++: CTAD and explicit deduction guides for copy-list-init [PR90210]

2020-09-19 Thread Marek Polacek via Gcc-patches
This PR points out that we accept template struct tuple { tuple(T); }; // #1 template explicit tuple(T t) -> tuple; // #2 tuple t = { 1 }; despite the 'explicit' deduction guide in a copy-list-initialization context. That's because in deduction_guides_for we first find the user-defined ded