I am thinking of replacing all instances of the safe idlom bool with an explicit operator bool in code that already uses the features of C ++ 11 (so the fact that older compilers do not recognize explicit conversion operators does not matter), so I would like to know can this cause some subtle problems.
So what are all the possible incompatibilities (even the smallest ones) that could be caused by the transition from the old and dumb safe idiom bool to the new and shiny explicit operator bool ?
EDIT: I know switching is a good idea, as the latter is a language function well understood by the compiler, so it will work no worse than actually hacking. I just want to know the possible differences.
c ++ language-lawyer c ++ 11 safe-bool-idiom
Fanana
source share