Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-06-22 16:54:41


Hello all,
        I've been analyzing a failure in Boost.Function with MSVC and STLport 4.0.
It appears that, even though STLport has a conforming allocator, MSVC won't
allow use of it. The 'rebind' member template, which is conspicuously absent
from the standard library that ships with MSVC, cannot be used so far as I
can tell. The standard usage (template parameters Allocator and T):

typedef typename Allocator::template rebind<T>::other t_allocator_type;

causes an internal compiler error. I was not able to find a real workaround.

It seems that only regex rebinds allocators. The method used in regex is to
create a new class that derives from Allocator but handles the allocations
for the new type T. This requires Allocator to allocator chars so that the
derived allocator can work.

So now come the questions. It would appear that MSVC6sp5 cannot support
standard allocators. Possible remedies are:
        1) Export the regex hack so that other libraries can use it.
        2) Define BOOST_NO_STD_ALLOCATOR for MSVC, always.
        3) Find another magic hack

Help?

        Confusedly-yours,
        Doug


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