A resolution with which g++ is happy again is:
struct if_ { private: enum { value = static_cast<bool>(C::value) };
typedef if_c< value , T1 , T2 > almost_type_; etc.
Does this solution have any impact on compilation time?
Most probably. I haven't measured it for this case, but from former benchmark, I know that *every* type and *every* value counts. Well, I calculated "Apfelmännchen" at compile-time, so I needed speed :)) Especially types are slow and you are adding an additional unnamed enum-type in your code above. But there might be another solution, although not very elegant:
struct if_ { private: typedef if_c< bool(C::value) , T1 , T2 > almost_type_; ...
the GCC likes it much better than the static_cast-version and you avoid a new type. You might want to run some benchmarks for your "typical" applications, though :)
Regards, Daniel
-- Daniel Frey
aixigo AG - financial training, research and technology Schloß-Rahe-Straße 15, 52072 Aachen, Germany fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99 eMail: [EMAIL PROTECTED], web: http://www.aixigo.de
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost