@@ -5464,7 +5464,7 @@ The compiler is more likely to get the default semantics right and you cannot im
5464
5464
Tracer& operator=(Tracer&&) = default;
5465
5465
};
5466
5466
5467
- Because we defined the destructor, we must define the copy and move operations. The `=default` is the best and simplest way of doing that.
5467
+ Because we defined the destructor, we must define the copy and move operations. The `= default` is the best and simplest way of doing that.
5468
5468
5469
5469
##### Example, bad
5470
5470
@@ -7484,7 +7484,7 @@ The default is the easiest to read and write.
7484
7484
7485
7485
enum class Direction : char { n, s, e, w,
7486
7486
ne, nw, se, sw }; // underlying type saves space
7487
-
7487
+
7488
7488
enum class Web_color : int { red = 0xFF0000,
7489
7489
green = 0x00FF00,
7490
7490
blue = 0x0000FF }; // underlying type is redundant
@@ -12180,10 +12180,10 @@ Not all member functions can be called.
12180
12180
##### Example
12181
12181
12182
12182
class Vector { // very simplified vector of doubles
12183
- // if elem!= nullptr then elem points to sz doubles
12183
+ // if elem != nullptr then elem points to sz doubles
12184
12184
public:
12185
12185
Vector() : elem{nullptr}, sz{0}{}
12186
- vector(int s) : elem{new double},sz{s} { /* initialize elements */ }
12186
+ vector(int s) : elem{new double}, sz{s} { /* initialize elements */ }
12187
12187
~Vector() { delete elem; }
12188
12188
double& operator[](int s) { return elem[s]; }
12189
12189
// ...
0 commit comments