|
Boost : |
Subject: Re: [boost] Using allocator rebind on an incomplete type
From: Bo Persson (bop_at_[hidden])
Date: 2008-10-27 12:52:46
Chris Newbold wrote:
>> From: boost-bounces_at_[hidden]
>> [mailto:boost-bounces_at_[hidden]] On Behalf Of Bo Persson
>> Sent: Saturday, October 25, 2008 8:13 AM
>
>> Yes, but their other choice is to use a Node* as the link between
>> the list nodes. That imposes a different set of constraints on user
>> defined allocators.
>
> The libstdc++ list implementation does not appear to impose the
> incomplete type constraint on allocators.
No, but they impose the constraint that allocator<T>::pointer must be
T*.
This is allowed by the (current) standard, but it also recommends
implementations to not have this restriction.
>
> I realize that there is practically nothing that I can do about the
> constraints that Microsoft's list is imposing, but I did want to
> get a feel for whether the constraint on incomplete types is
> something that I should expect or whether I should just implement a
> Microsoft-specific workaround for the case I've run into...
>
It is a different set of constraints. You choose what is "normal" and
what needs a "workaround"...
Bo Persson
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk