Boost logo

Boost :

Subject: [boost] Using allocator rebind on an incomplete type
From: Chris Newbold (Chris.Newbold_at_[hidden])
Date: 2008-10-23 15:01:57


In trying to clean up some code in Boost.Pool, I've run afoul of some code in Microsoft's implementation of the STL where they are using allocator::rebind on an incomplete type. Something like this:

    struct Node; // Incomplete!

    template<typename T, typename Alloc>
    struct List
    {
        Alloc<T>::rebind<Node>::other::pointer node_p;
        ...
    }

I believe that attempting to instantiate an allocator with an incomplete type is illegal so, by extension, I would have assumed that attempting to rebind on an incomplete type would also be illegal, no?

-Chris


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