要約:nullptrに変換しbool、 にbool変換するのにint、なぜ にnullptr変換しないのintですか?
このコードは問題ありません:
void f(bool);
f(nullptr); // fine, nullptr converts to bool
そして、これは大丈夫です:
bool b;
int i(b); // fine, bool converts to int
では、なぜこれは大丈夫ではないのでしょうか。
void f(int);
f(nullptr); // why not convert nullptr to bool, then bool to int?