C++中的explicit关键字
摘要:class WTF { public: explicit WTF(int, float f = 0.1) {} //explicit只对类型转换构造函数有效 //表明禁止使用这个构造函数进行隐式类型转换 }; void FKU(const WTF&) { } int main() { int val
阅读全文
posted @ 2016-09-05 20:54
posted @ 2016-09-05 20:54
posted @ 2016-09-05 20:47