Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-06-22 17:21:42

Constructs like that one can be made to work with MSVC, although
occasionally you have to break them up, e.g.:

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


----- Original Message -----
From: "Douglas Gregor" <gregod_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, June 22, 2001 5:54 PM
Subject: [boost] MSVC, STLport, and allocators

> 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
> allow use of it. The 'rebind' member template, which is conspicuously
> 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
> It seems that only regex rebinds allocators. The method used in regex is
> 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
> Info: Unsubscribe:
> Your use of Yahoo! Groups is subject to

Boost list run by bdawes at, gregod at, cpdaniel at, john at