All three declarations are illegal. We cannot directly create object of BinaryQuery
, AndQuery
or OrQuery
. All these class are used for implementation, and they are not part of the interface. User code cannot use them directly, because all members of these class are not public
, including constructors. Meanwhile, there is not constructor for class BinaryQuery
, AndQuery
or OrQuery
that takes a shared_ptr<Query_base>
as parameter.