Use of boost::make_shared in query

Sixth pass.