Tag: 安全bool idiom

有没有什么情况下,typedef是绝对必要的?

考虑以下安全布尔成语的摘录: typedef void (Testable::*bool_type)() const; operator bool_type() const; 是否可以声明转换函数没有typedef? 以下不编译: operator (void (Testable::*)() const)() const;