Skip to content

Commit

Permalink
修改成员初始化列表描述
Browse files Browse the repository at this point in the history
  • Loading branch information
huihut committed Jun 20, 2019
1 parent e9d8fc7 commit b486932
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ auto fcn2(It beg, It end) -> typename remove_reference<decltype(*beg)>::type
* 有些场合必须要用初始化列表:
1. 常量成员,因为常量只能初始化不能赋值,所以必须放在初始化列表里面
2. 引用类型,引用必须在定义的时候初始化,并且不能重新赋值,所以也要写在初始化列表里面
3. 没有默认构造函数的类类型,因为使用初始化列表可以不必调用默认构造函数来初始化,而是直接调用拷贝构造函数初始化。
3. 没有默认构造函数的类类型,因为使用初始化列表可以不必调用默认构造函数来初始化
### initializer_list 列表初始化
Expand Down
2 changes: 1 addition & 1 deletion README_Details.md
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ auto fcn2(It beg, It end) -> typename remove_reference<decltype(*beg)>::type
* 有些场合必须要用初始化列表:
1. 常量成员,因为常量只能初始化不能赋值,所以必须放在初始化列表里面
2. 引用类型,引用必须在定义的时候初始化,并且不能重新赋值,所以也要写在初始化列表里面
3. 没有默认构造函数的类类型,因为使用初始化列表可以不必调用默认构造函数来初始化,而是直接调用拷贝构造函数初始化。
3. 没有默认构造函数的类类型,因为使用初始化列表可以不必调用默认构造函数来初始化
### initializer_list 列表初始化
Expand Down

0 comments on commit b486932

Please sign in to comment.