I have the following declared in my project:
enum class OType : bool { Dynamic=true, Static=false };
OType getotype();
I'm using the following function:
double ComputeO(double K,bool type)
I'm calling it this way :
ComputeO(some double, static_cast<bool>(getotype()))
For this static_cast I'm getting a nice:
warning C4800: 'const dmodel::OType ' : forcing value to bool 'true' or 'false' (performance warning)
I don't know how to get rid of it,I specify the cast explicitly shouldnt it be enough ?
Note: I'm using VC11 ( Visual Studio 2012 )
Thks.