[Xapian-devel] Bindings and overloading
Olly Betts
olly@survex.com
Thu, 3 Jun 2004 15:38:45 +0100
On Thu, Jun 03, 2004 at 03:25:57PM +0100, James Aylett wrote:
> (Also, it works on vector<Query*> not vector<string&>, so you'd need
> to do something horrible like:
The C++ template version isn't specific to vector<> or Query* - it
just relies on the iterators being inputiterators (I think) and
calls add_subquery() with the dereferenced iterator so as the
documentation says:
The iterators may be to Xapian::Query objects, pointers to
Xapian::Query objects, or termnames (std::string-s).
So if possible, we ought to wrap this so it works with strings without
having to explicitly build Xapian::Query objects from them first.
Cheers,
Olly