error C2663: 'mongo::Query::sort' : 2 overloads have no legal conversion for'this' pointer.
I believe this is something to do with using const Query with its member function sort. But if I change it to Query& without the const, then my parameter initialization = BSONObj() raises:
cannot convert from 'mongo::BSONObj' to 'mongo::Query &'
If I pass Query qu by value, then neither of these problems arise.
Is there a way to avoid either error? Is it really bad form to use a default value for a param?