|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-06-22 20:16:47
On Friday 22 June 2001 06:21, you wrote:
> 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;
>
> -Dave
Doesn't work :(
Take a very simple test program:
template<typename Allocator, typename T>
struct foo {
typedef Allocator::template rebind<T> new_alloc; // #1
typedef typename new_alloc::other allocator_type;
};
MSVC tries to look up "rebind" for some reason, and chokes. So I try to fake
a rebind, assuming it will fix things later:
template<typename T> struct rebind { struct other {}; };
Now I get an internal compiler error at the line marked #1.
All this occurs before it's even tried to instantiate anything :(
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk