GCC: Forbid implicit bool->int conversion
c++, gcc
Solution
As a workaround, in C++11, you may delete the other possible overloads:
template <typename T> void function(int, T) = delete;
Problem
Is there any gcc flag to forbid implicit `bool` to `int` conversion? I want to get any warning with this code: ``` void function( int value, bool flag ) { } int main() { int a = 123; bool flag = true; //oops, a common mistake function( flag, a ); } ```