Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-06-23 06:24:48


>typedef typename Allocator::template rebind<T>::other t_allocator_type;
>
>causes an internal compiler error. I was not able to find a real
workaround.

You might try splitting that up:

typedef typename Allocator::template rebind<T>::other bound_type;
typedef typename bound_type::other alloc_type;

A lot of compilers seem to choke if you don't do that.

However I don't think the STLport has a conformant allocator when used with
VC6 (it omits member templates) so this is a moot point anyway.

>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.

That's ugly as sin I know, but it does at least 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.

Sure if you want it.

> 2) Define BOOST_NO_STD_ALLOCATOR for MSVC, always.

Yes we should do that.

> 3) Find another magic hack

- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/


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