[Xapian-devel] C++ MatchDecider::operator() is const
Olly Betts
olly at survex.com
Thu Oct 2 12:34:31 BST 2008
On Thu, Oct 02, 2008 at 12:31:35PM +0100, James Aylett wrote:
> On Thu, Oct 02, 2008 at 11:41:10AM +0100, Olly Betts wrote:
>
> > The intention is certainly that a MatchDecider should make an
> > independent decision about each document.
>
> Can you cast away the constness of ``this''? I believe this is how you'd
> implement caching, so there is a route for people who really know what
> they're doing.
For caching, the usual approach is to declare the members variable(s)
concerned as "mutable".
Cheers,
Olly
More information about the Xapian-devel
mailing list