summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGeoff Liu <g@geoffliu.me>2015-05-06 15:25:28 -0600
committerGeoff Liu <g@geoffliu.me>2015-05-06 15:25:28 -0600
commit25bd06d77a70964acfbdbf8a7c7a50eb312eae9f (patch)
treef11acbac770048b386b4cb09aa1de2bc569190d6
parent6c635d1c3e5bb88940fb0afb01218d2e7d3f11c0 (diff)
comment changes
-rw-r--r--c++.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/c++.html.markdown b/c++.html.markdown
index 517ce367..66d4aeb1 100644
--- a/c++.html.markdown
+++ b/c++.html.markdown
@@ -692,7 +692,7 @@ int* pt2 = new int;
*pt2 = nullptr; // Doesn't compile
pt2 = nullptr; // Sets pt2 to null.
-// But somehow 'bool' type is an exception.
+// But somehow 'bool' type is an exception (this is to make `if (ptr)` compile).
*pt = nullptr; // This still compiles, even though '*pt' is a bool!
@@ -702,8 +702,8 @@ Foo f2;
Foo f1 = f2;
// Calls Foo::Foo(const Foo&) or variant, but only copies the 'Foo' part of
-// 'fooSub'. Any extra members of 'fooSub' are discarded. This lovely behavior
-// is called "object slicing."
+// 'fooSub'. Any extra members of 'fooSub' are discarded. This sometimes
+// horrifying behavior is called "object slicing."
FooSub fooSub;
Foo f1 = fooSub;