Boost logo

Boost :

Subject: Re: [boost] Using allocator rebind on an incomplete type
From: David Abrahams (dave_at_[hidden])
Date: 2008-10-27 17:12:36


on Mon Oct 27 2008, Chris Newbold <Chris.Newbold-AT-mathworks.com> 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.
>
> 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...

Hi Chris,

If you want to write portable code, you should expect any constraints
that the standard allows the library to impose. A particular library
implementation may choose to impose fewer constraints, of course. That
appears to be the case for libstdc++, but that doesn't mean you should
count on it.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk