================
@@ -25,7 +25,7 @@ template <int &> struct S {}; // #dr1801-S
 S<i> V; // #dr1801-S-i
 // cxx98-14-error@-1 {{non-type template argument does not refer to any 
declaration}}
 //   cxx98-14-note@#dr1801-S {{template parameter is declared here}}
-// since-cxx17-error@#dr1801-S-i {{non-type template argument refers to 
subobject '.i'}}
+// cxx17-error@#dr1801-S-i {{non-type template argument refers to subobject 
'.i'}}
----------------
Endilll wrote:

Quoting P1907R1 wording changes:
> For a non-type template-parameter of reference or pointer type <...> the 
> reference or pointer value shall not refer to or be the address of 
> (respectively):
> ~a subobject (6.7.2),~
> <...>
> a subobject (6.7.2) of one of the above.

My reading is that you indeed can reference subobjects in NTTP since 20, unless 
they fall into one of the narrow categories listed in that paragraph. The 
change you made is correct, unless P1907R1 was adopted as a DR.

Sorry I forgot to check current wording when I added the test.

https://github.com/llvm/llvm-project/pull/78041
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to