I tried to use Loki in VS2005, an error occured when compiling:
c:/program files/microsoft visual studio 8/vc/include/xutility(314) : error C2664:
'bool `anonymous-namespace'::CompareFixedAllocatorSize::operator ()(const Loki::FixedAllocator &,size_t) const' :
cannot convert parameter 1 from 'const size_t' to 'const Loki::FixedAllocator &'
I google out the reason on internet, it can be easily fixed, you just need to insert extra two implementation of operator() to Loki::CompareFixedAllocatorSize when _DEBUG is defined:
#ifdef _DEBUG
bool operator()(std::size_t numBytes, const FixedAllocator &x) const
{
return numBytes < x.BlockSize();
}
bool operator()(const FixedAllocator &x, const FixedAllocator &y) const
{
return x.BlockSize() < y.BlockSize();
}
#endif
If you wanna know why and get further information, see this:
VC 2005 RC with Loki small object allocator, std::lower_bound, and CompareFixedAllocatorSize