From 889685274438ca20344d4d9cb472e4392c4e35a9 Mon Sep 17 00:00:00 2001
From: Sean Baxter 1.5
or a linear type system. Unless explicitly initialized, objects
start out uninitialized. They can’t be used in this state. When
you assign to an object, it becomes initialized. When you relocate from
-an object, it’s value is moved and it’s reset to uninitialized. If you
+an object, its value is moved and it’s reset to uninitialized. If you
relocate from an object inside control flow, it becomes potentially
uninitialized, and its destructor is conditionally executed after
reading a compiler-generated drop flag.
safe
contextstd::string_view
was added to C++17 as a safer alternative to passing character pointers
around. Unfortunately, its rvalue-reference constructor is so
-dangerously designed that its reported to encourage
+dangerously designed that it’s reported to encourage
use-after-free bugs.[string-view-use-after-free]
string_view0.cxx – (Compiler Explorer)
@@ -2560,7 +2560,7 @@'R1 : 'R0 @ P3
@@ -2642,8 +2642,8 @@
Borrow checking is easiest to understand when applied to a single function. The function is lowered to a control flow graph, the compiler assigns regions to loans and borrow variables, emits lifetime @@ -4343,8 +4343,8 @@
mut
, also determines exclusivity.
But the cast-away-const model of interior mutability is an awkward
@@ -4485,7 +4485,7 @@ T
is
send
. Since most types are
send
by construction, we can safely
-mutate shared state over multiple threads as long as its wrapped in a
+mutate shared state over multiple threads as long as it’s wrapped in a
std2::mutex
and that’s owned by an
std2::arc
.
@@ -4798,7 +4798,7 @@