I’m running into an error parsing the source:
// Enum.cpp
namespace ns {
typedef enum _E E;
typedef struct _S S;
}
namespace ns {
typedef enum _E E;
typedef struct _S S;
}
// End Enum.cpp
CLang output:
enum.cpp(6,20) : error: typedef redefinition with different types (‘enum _E’ vs ‘enum _E’)
typedef enum _E E;
^
enum.cpp(2,20) : note: previous definition is here
typedef enum _E E;
^
I’m not a C++ “lawyer” so I’m not sure if this is a CLang issue, or a construct forbidden by the C++ standard? If this is in the standard, why does the same not apply to struct?
Thanks in advance.
-Uri Mann