use reference-removed decltype in query macro