Write a typeid expression to see whether two Query_base pointers point to the same type. Now check whether that type is an AndQuery.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.