When comparing enums that come from different sources such as those of the following code GCC emits warnings. Is there a way to avoid these warnings without c-style casts?
struct Enumerator
{
enum { VALUE = 5 };
};
template<int V>
struct TemplatedEnumerator
{
enum { VALUE = V };
};
if(Enumerator::VALUE == TemplatedEnumerator<5>::VALUE)
{
...
}
And GCC emits the following type of warning:
GCC: warning: comparison between 'enum ...' and 'enum ...'