Skip to content

Commit 035d639

Browse files
committed
fix (learncpp_6): use concise language
1 parent 1cf2ebd commit 035d639

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/posts/learncpp_6/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ std::vector<std::string_view> names{ "Alex", "Betty", "Caroline", "Dave","Emily"
4545
4646
`resize`成员函数会同时改变容量和长度,`reserve`只改变容量。
4747
48-
`emplace_back`会显示调用构造函数,直接在栈顶构建对象,如果是是临时对象,那么要注意如果有`explicit`那么不能执行隐式转换。而`push_back`会发生一次拷贝。
48+
`emplace_back`会显示调用构造函数,直接在堆上预留的内存构建对象,如果是是临时对象,那么要注意如果有`explicit`那么不能执行隐式转换。而`push_back`会发生一次拷贝。
4949
5050
## std::array
5151

0 commit comments

Comments
 (0)