For the expression built in Figure 15.3 (p. 638):
Query q = Query("fiery") & Query("bird") | Query("wind");
(a) List the constructors executed in processing that expression.
5. Query::Query(std::shared_ptr<Query_base> query) 2times
8. Query::Query(std::shared_ptr<Query_base> query) 2times
claims that the Query::Query(std::shared_ptr<Query_base> query) constructor is called multiple times for the expression, but the answer for exercise 15.36 two sections down contradicts it.
README for exercise 15.34:
claims that the
Query::Query(std::shared_ptr<Query_base> query)
constructor is called multiple times for the expression, but the answer for exercise 15.36 two sections down contradicts it.I did the exercise myself and the output was similar to the above.