================
@@ -18,6 +30,38 @@ void f(B b) {
 struct D : B {};
 } // namespace cwg2718
 
+namespace cwg2749 { // cwg2749: 19
+
+extern int x[2];
+struct Y {
+  int i;
+  int j;
+};
+extern Y y[2];
+
+#if __cplusplus >= 201103L
+static_assert(static_cast<void*>(x + 0) < static_cast<void*>(x + 1), "");
+static_assert(static_cast<void*>(&y[0].i) < static_cast<void*>(&y[0].j), "");
+static_assert(static_cast<void*>(&y[0].j) < static_cast<void*>(&y[1].i), "");
+#else
+enum X {
+  a = static_cast<void*>(x + 0) < static_cast<void*>(x + 1),
----------------
Endilll wrote:

You should copy over the C++98 "backport" of `static_assert` from e.g. (we use 
it liberally across DR test suite)
https://github.com/llvm/llvm-project/blob/0eb9e021b15f477b796a6aaed94c94887f19171c/clang/test/CXX/drs/cwg1xx.cpp#L8-L11

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

Reply via email to