From: Aleksey Gurtovoy (alexy_at_[hidden])
Date: 2002-03-13 12:35:55
David Abrahams wrote:
> > The canonical workaround is to wrap in boost::type<> (code
> > off the top of my head):
> > template<class T> yes_type is_pointer_helper(type<T*>);
> > no_type is_pointer_helper(...);
> > is_pointer<T>::value = sizeof(yes_type) ==
> > sizeof(is_pointer_helper(type<T>()));
> > Does it work here?
> That was the first thing I tried. Internal compiler errors with VC6.
FWIW, in my experience 'type' (and 'value') are really unfortunate names for
class templates, if you want you code to compile stabily under VC6; both
correlate with our naming convention of "returning" types/values from
metafunctions, and that doesn't help the compiler. Without seeing the code
and errors I can't say if that's the case, but there is a chance that using
something named less provocative as a wrapper template can help here.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk