[Xapian-devel] C++ MatchDecider::operator() is const
James Aylett
james-xapian at tartarus.org
Thu Oct 2 12:38:42 BST 2008
On Thu, Oct 02, 2008 at 12:34:31PM +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".
Ah, yes. Tricksy stuff, C++.
J
--
/--------------------------------------------------------------------------\
James Aylett xapian.org
james at tartarus.org uncertaintydivision.org
More information about the Xapian-devel
mailing list