On Wed, 2003-07-16 at 18:01, Alan Barrett wrote: > On Tue, 15 Jul 2003, Serassio Guido wrote:
> Alternatively, would MSVC be happier with references instead of
> pointers? (This whould need changes elsewhere, of course.)
>
> MemPool & ACLStrategised<MatchType>::Pool (NULL);
>
> You might also need extra parentheses in all the above.
References aren't an option.
The Pool member is used in overloaded operator new and delete's - the
new looks roughly like:
void *
SomeClass::operator new(size_t byteCount)
{
assert(byteCount == sizeof (SomeClass));
if (!Pool)
Pool = memPoolCreate("SomeClass",sizeof(SomeClass));
return memPoolAlloc(Pool);
}
What we can do is convert MemPool.c to MemPool.cc and make MemPool's
able to be be statically allocated, rather than only dynamically.
i.e.
MemPool ACLStrategised<MatchType>::Pool
(sizeof(ACLStrategised<MatchType>));
Rob
--
GPG key available at: <http://members.aardvark.net.au/lifeless/keys.txt>.
signature.asc
Description: This is a digitally signed message part
