随笔分类 -  C++

C++ 之explicit 用法
摘要:explicitC++ Specific This keyword is a declaration specifier that can only be applied to in-class constructor declarations. Constructors declared explicit will not be considered for implicit conversions. For example:class X {public: explicit X(int); //legal explicit X(double) { //legal // ... }};exp 阅读全文
posted @ 2011-08-05 17:15 北冥神功 阅读(699) 评论(0) 推荐(0)