|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I have a warning 'comparison between enum and const enum'.
I tried using static_cast<>.The warning is resolved.but is it really safe at runtime. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
sreeni wrote:
> I have a warning 'comparison between enum and const enum'. > > I tried using static_cast<>.The warning is resolved.but is it really > safe at runtime. > Show the code. -- Ian Collins. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On 2008-02-07 07:49, Ian Collins wrote:
> sreeni wrote: >> I have a warning 'comparison between enum and const enum'. >> >> I tried using static_cast<>.The warning is resolved.but is it really >> safe at runtime. Seconded, but I would like to add that you should probably use const_cast to cast the non-const enum to const before comparing instead of using static_cast. -- Erik Wikström |
|
![]() |
| Outils de la discussion | |
|
|