Skip to content

Commit

Permalink
fixed some bugs in ch15/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
XDXX committed Sep 17, 2015
1 parent 9413fc0 commit 4055a15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ch15/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ As a result, the default constructor of any class derived from it has been defin
> Redefine your `Bulk_quote` class to inherit its constructors.
**rules:**

1. only inherit from the direct base class.
2. default, copy and move constructors can not inherit.
3. any data members of its own are default initialized.
Expand All @@ -221,7 +222,9 @@ The objects held for this exercise are smart pointers to the Quote objects.In th
> Given that s1, s2, s3, and s4 are all strings, determine what objects are created in the following expressions:
> (a) `Query(s1) | Query(s2) & ~ Query(s3);`
> (b) `Query(s1) | (Query(s2) & ~ Query(s3));`
> (c) `(Query(s1) & (Query(s2)) | (Query(s3) & Query(s4)));`
* (a) `OrQuery, AndQuery, NotQuery, WordQuery`
Expand All @@ -236,7 +239,6 @@ While being copied, the synthesized copy constructor is called. It copies the da

* **move:**
while being moved, the synthesized move constructor is called. It moves the data member into the new object. In this case, the shared pointer from the newly created object will point to the address to which the original shared pointer pointed.

After the move operation, the use count of the shared pointer in the new object is 1, whereas the pointer from the original object becomes `nullptr`.

* **copy assignment:**
Expand Down Expand Up @@ -382,4 +384,4 @@ Since `std::make_shared` will allocate dynamically a new `std::set`, nothing wil
> **(c)** Allow the user to limit the results so that only matches in a given range of lines are displayed.
Here are solutions for [(b)](ex15.42_b/main.cpp) and [(c)](ex15.42_c/main.cpp)
Here are solutions for [(b)](ex15.42_b/main.cpp) and [(c)](ex15.42_c/main.cpp).

0 comments on commit 4055a15

Please sign in to comment.