================
@@ -86,6 +86,23 @@ struct A {
 };
 }
 
+namespace cwg1458 { // cwg1458: 3.1
+#if __cplusplus >= 201103L
+struct A;
+
+void f() {
+  constexpr A* a = nullptr;
+  constexpr int p = &*a;
+  // expected-error@-1 {{cannot initialize a variable of type 'const int' with 
an rvalue of type 'A *'}}
+  constexpr A *p2 = &*a;
----------------
shafik wrote:

So the DR says it is "unspecified" so are we documenting here that this will 
always be the behavior? Maybe worth a comment?

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

Reply via email to