Re: operator= in allocators
From: Mark A. Gibbs (x_gibbsmark_at_rogers.com_x)
Date: 04/04/04
- Next message: Leor Zolman: "Re: refcounting and protecting against delete"
- Previous message: Leor Zolman: "Re: friend operator>> function declaration for a template class"
- In reply to: Claudio Puviani: "Re: operator= in allocators"
- Next in thread: Rolf Magnus: "Re: operator= in allocators"
- Reply: Rolf Magnus: "Re: operator= in allocators"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 04 Apr 2004 01:43:38 GMT
Claudio Puviani wrote:
> 20.1.5 ("Allocator requirements") doesn't state copyability as a
> requirement. Comparison, yes, but definitely not copying.
But that makes no logical sense if containers own their allocator.
vector<int, SomeAllocator> foo()
{
SomeAllocator a;
vector<int, SomeAllocator> v(a);
return v;
}
void bar()
{
vector<int, SomeAllocator> v = foo();
// Undefined behaviour
}
And how can the containers not own their own allocator?
mark
- Next message: Leor Zolman: "Re: refcounting and protecting against delete"
- Previous message: Leor Zolman: "Re: friend operator>> function declaration for a template class"
- In reply to: Claudio Puviani: "Re: operator= in allocators"
- Next in thread: Rolf Magnus: "Re: operator= in allocators"
- Reply: Rolf Magnus: "Re: operator= in allocators"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|