Use of boost::make_shared in query

Fifth pass.