Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-08-23 07:28:02

From: "Aleksey Gurtovoy" <alexy_at_[hidden]>
> Peter Dimov wrote:
> > When compiling another_tuple_test_bench.cpp, I get internal
> > compiler errors in type_traits:
> [snip]
> I suppose you are talking about VC7.x,


> because MSVC6.0 SP5 compiles
> type_traits headers without a single problem. Besides missing definitions
> traits classes' static 't' member, the questioned code is perfectly legal,

Well the missing definition is exactly what I had in mind when I questioned
the legality of the code. :-)

> and the real source of the problems you've described is that the new
> of MS compiler still does not properly support static class data members
> const integral/enumeration types. In particular, any expression in form of
> "sizeof(& <dependent-name>)", e.g.
> template<typename T>
> struct her
> {
> static T t;
> };
> template<typename T>
> struct my
> {
> static bool const value = sizeof(&her<T>::t);
> };
> is very likely to cause an infamous ICE there. This is definitely a
> deficiency of the compiler, and IMO, instead of "fixing" the code, we
> disable the broken feature until it gets usable (#define
> BOOST_NO_INCLASS_MEMBER_INITIALIZATION, right now it gots enabled by
> if _MSC_VER > 1200).

It fails with either static const or enum. The supplied config.hpp still
knows nothing about VC 7, so I tried first to simply replace 1200 with 1300,
leaving all defines intact. Then I tried to enable static const members,
still without any luck.

Peter Dimov
Multi Media Ltd.

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