Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2004-11-29 11:04:29


> 1) a corrected version of is_abstract_template_test.cpp

I've updated is_abstract test with your tests, found that VC7.1 has the same
bug (?) as gcc-3.4 BTW.

> 2) a patch to boost/type_traits/is_abstract.hpp that works around gcc
> bug #17232.
>
> I would not be surprised if my patch turns out to be overly
> complicated. I had assumed that any expression that involves
> sizeof(T) causes the instantiation of T if T is a template
> specialization. So I tried, e.g., to add the condition
> sizeof(T) > 0 to the parameter list of ice_and in is_abstract_imp.
> For some reason, though, whatever I tried showed no effect.
> (Perhaps the compiler realized that the conditions I added were
> true for any type T and eliminated the evaluation of sizeof(T)?)
>
> I finally settled for attached patch that adds a further struct in
> which SFINAE is used again.

I've simplified your fix down to a:

BOOST_STATIC_ASSERT(sizeof(T));

which also does the trick quite nicely.

I'm running all the type traits tests through now, as long as there are no
unexpected hiccups it'll all be in cvs soon.

John.


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