================
@@ -101,6 +101,20 @@ static_assert(!__is_layout_compatible(StructWithAnonUnion, 
StructWithAnonUnion3)
 #endif
 } // namespace cwg2759
 
+namespace cwg2768 { // cwg2768: 20
+#if __cplusplus >= 201103L
+enum class E {E1};
+
+void f() {
+  E e;
+  e = E{0}; // #1
+  // cxx11-14-error@-1 {{cannot initialize a value of type 'E' with an rvalue 
of type 'int'}}
+  e = {0};  // #2
+  // since-cxx11-error@-1 {{cannot initialize a value of type 'E' with an 
rvalue of type 'int'}}
----------------
cor3ntin wrote:

can you add a test for `e = {E::E1}` ?

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

Reply via email to