================
@@ -252,4 +252,14 @@ namespace dr2397 { // dr2397: 17
     auto (*c)[5] = &a;
   }
 } // namespace dr2397
+
+// CWG2363 was closed as NAD, but its resolution does affirm that
+// a friend declaration cannot have an opaque-enumm-specifier.
+namespace dr2363 { // dr2363: yes
+struct A {
+  friend enum class E; // since-cxx11-error {{reference to enumeration must 
use 'enum' not 'enum class'}}
+                       // expected-error@-1 {{elaborated enumeration type 
cannot be a friend}}
+};
----------------
Endilll wrote:

It would be nice to have a test case for unscoped enum with fixed underlying 
type, and also test cases when enum has been already declared by the point 
where it's befriended.

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

Reply via email to