You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But this isn't allowed by the C++03 standard. The following simple test code (two files) demonstrates the issue:
myenum.h:
enum MyEnum {FOO, BAR, BAZ};
cppclean_test4.h:
// Header file where enum MyEnum is defined.
#include "myenum.h"
class A
{
// f takes a reference to MyEnum, but as an enum it can't be forward declared.
void f(MyEnum & bar);
};
cppclean prints:
cppclean_test4.h:2: 'myenum.h' does not need to be #included; use a forward declaration instead
The text was updated successfully, but these errors were encountered:
But this isn't allowed by the C++03 standard. The following simple test code (two files) demonstrates the issue:
myenum.h:
cppclean_test4.h:
cppclean prints:
The text was updated successfully, but these errors were encountered: