安全な bool イディオムのすべてのインスタンスを、explicit operator bool
既に C++11 機能を使用しているコードで置き換えることを考えています (そのため、古いコンパイラが明示的な変換演算子を認識しないという事実は問題になりません)。微妙な問題を引き起こす可能性がある場合。
したがって、古くて鈍い安全な bool イディオムから新しい光沢のあるイディオムに切り替えることによって引き起こされる可能性のあるすべてexplicit operator bool
の非互換性 (最も細かいものであっても) は何ですか?
EDIT: I know that switching is a good idea anyway, for the latter is a language feature, well-understood by the compiler, so it'll work no worse than what's in fact just a hack. I simply want to know the possible differences.