Skip to content

Commit d1f6eab

Browse files
committed
mentionned the placement new operator
1 parent 25eadcb commit d1f6eab

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.icarukTime.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"idleHeartbeats": 14613,
3-
"navigatingHeartbeats": 3086,
4-
"totalCodingHeartbeats": 19531,
2+
"idleHeartbeats": 14722,
3+
"navigatingHeartbeats": 3148,
4+
"totalCodingHeartbeats": 19615,
55
"languageHeartbeats": {
66
"jsonc": 47,
77
"toml": 3591,
8-
"markdown": 11342,
8+
"markdown": 11426,
99
"html": 3210,
1010
"scminput": 1066,
1111
"yaml": 17,
@@ -53,7 +53,7 @@
5353
"content/test/pentagone/index.md": 232,
5454
"git/scm0/input": 234,
5555
"layouts/shortcodes/qr.html": 92,
56-
"content/posts/constructor_in_rust/index.md": 757,
56+
"content/posts/constructor_in_rust/index.md": 841,
5757
"extension-output-mkxml.vscode-filesize-#1-filesize": 210
5858
}
5959
}

content/posts/constructor_in_rust/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Primitive types like integers or floats already have a native syntax for constru
2727
- **Encapsulation** : It's about invariant and control. Deciding what value are valid or what relation the structure should hold. The goal is to avoid any invalid state, typically achieved through data hiding and encapsulation.
2828

2929
- **Placement** : In C++, constructors can be used for placement initialization, allowing an object to be constructed at a specific memory location
30-
(e.g. on the stack or the heap). (Thanks to [Nabushika on reddit](<https://www.reddit.com/r/learnrust/comments/1qinygp/comment/o0w5ehd/>) for clarifying this sentence)
30+
(e.g. on the stack or the heap) using the placement new operator. (Thanks to [Nabushika on reddit](<https://www.reddit.com/r/learnrust/comments/1qinygp/comment/o0w5ehd/>) for clarifying this sentence)
3131

3232
## Move Semantic: Copy and Clone
3333

0 commit comments

Comments
 (0)