Boost logo

Boost :

From: Michael Stevens (michael_at_[hidden])
Date: 2002-10-18 07:21:51

David commented regarding the patch:

>> At present (for MSVC) STATIC_ASSERT uses the typedef mechanism. This
>> fails with template paramter compile time constant. However the
>> alternative enum mechanism DOES work. Iterestingly at present the enum
>> mechanism is explictly not used for MSVC. This is due to a quoted
>> problem with __LINE__ and /Zi. VC7 (not VC6) supplies the rather
>> useful __COUNTER__ alternative, which does work. With this in mind I
>> propose the following patch:
>Looks OK mostly, but you should only use a special version for VC7,
>not VC7.1 (BOOST_MSVC == 1301).
Not quite sure what the way to go is here. I think you are saying
(without access to 7.1 to veryify) that we should fall into the default
implementation for VC7.1 as if it were a compiler requring special
handling. That is the typedef version with __LINE__ Macro appended.

I think to get the result you require my patch just needs to use

#if !defined(__BORLANDC__) && !defined(__MWERKS__) &&
!(defined(BOOST_MSVC) && BOOST_MSVC <= 1300)
instead of
#if !defined(__BORLANDC__) && !defined(__MWERKS__) && !defined(BOOST_MSVC)

I can't commit any of this, so hopefully will take the plunge.


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