On 8/31/23 04:33, Jakub Jelinek wrote:
On Thu, Aug 31, 2023 at 06:02:36AM +0000, waffl3x via Gcc-patches wrote:

+++ b/gcc/testsuite/g++.dg/cpp23/explicit-object-param-valid2.C
@@ -0,0 +1,24 @@
+// P0847R7
+// { dg-do run { target c++23 } }

This raises an important question whether we as an extension
should support deducing this even in older standards or not.
I admit I haven't studied the paper enough to figure that out.
The syntax is certainly something that wasn't valid in older standards,
so from that POV it could be accepted say with pedwarn with
OPT_Wc__23_extensions if cxx_dialect < cxx23.  But perhaps some
of the rules in the paper change something unconditionally even when
the new syntax doesn't appear.
And, if it is accepted in older standards, the question is if it
shouldn't be banned say from C++98.

I don't think there's any obstacle to allowing it as an extension in older standards (with a pedwarn, of course).

Jason

Reply via email to