Re: custom allocator issue
On Mon, 27 Aug 2007 09:00:00 -0700, ranin02 <ranin02@yahoo.com> wrote:
Thanks very much for the response. I got past that part, but now have
a puzzling error. I am seeing the following error
error C2664:
'CObjectPoolListAlloc<Ty,_Node>::CObjectPoolListAlloc(const
CObjectPoolListAlloc<Ty,_Node> &) throw()' : cannot convert parameter
1 from 'CObjectPoolListAlloc<Ty,_Node>' to 'const
CObjectPoolListAlloc<Ty,_Node> &'
And the error is actually being given within the STL list code here:
_List_ptr(_Alloc _Al)
: _List_nod<_Ty, _Alloc>(_Al), _Alptr(_Al)
Why on earth would it not be able to convert to a const ref? Note
that CObjectPoolListAlloc does not in fact define a copy constructor,
but defaults to the base class. This code compiled fine before the
upgrade and my attemp to implement Rebind. Please forgive me if this
is a stupid question.
Assuming it's not a bug, there may be some ambiguity the compiler is
reporting with a less-than-helpful error message. So I'd look for that.
--
Doug Harrison
Visual C++ MVP