mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-04-02 10:13:06 +08:00
update
This commit is contained in:
16
basic_content/explicit/README.md
Normal file
16
basic_content/explicit/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# explicit(显式)关键字那些事
|
||||
|
||||
## 关于作者:
|
||||
|
||||
个人公众号:
|
||||
|
||||

|
||||
|
||||
- explicit 修饰构造函数时,可以防止隐式转换和复制初始化
|
||||
- explicit 修饰转换函数时,可以防止隐式转换,但按语境转换除外
|
||||
|
||||
|
||||
代码参见:[.explicit.cpp](./explicit.cpp)
|
||||
|
||||
参考链接:
|
||||
> https://stackoverflow.com/questions/4600295/what-is-the-meaning-of-operator-bool-const
|
||||
Reference in New Issue
Block a user