We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11b34de commit fdb5c1aCopy full SHA for fdb5c1a
1 file changed
content/posts/learncpp_6/index.md
@@ -47,6 +47,8 @@ std::vector<std::string_view> names{ "Alex", "Betty", "Caroline", "Dave","Emily"
47
48
`emplace_back`会显示调用构造函数,直接在堆上预留的内存构建对象,如果是是临时对象,那么要注意如果有`explicit`那么不能执行隐式转换。而`push_back`会发生一次拷贝。
49
50
+在 `make_unique` 下,始终会产生一次拷贝,此时两者表现一致。
51
+
52
## std::array
53
54
`array` 大部分功能都与 `constexpr` 兼容。
0 commit comments