Boost logo

Boost :

From: Kris Thielemans (kris.thielemans_at_[hidden])
Date: 2003-06-04 18:35:21


I've tried to use the random.hpp header using Visual Studio C++ 6.0, and it
does not
compile. I found a message thread in the mailing list about this on VC7,
where some work-arounds were suggested. Jens then asked for feedback, and I
didn't find any feedback, so here it is...

For example, in uniform_01.hpp there is

template<class UniformRandomNumberGenerator, class RealType = double>
class uniform_01
//////// cut
/////// cut

And VC6 breaks on the BOOST_STATIC_ASSERT when instantiating a

The following suggested work-around DOES compile.

The following variation does NOT compile.

The following suggested work-around does NOT compile.
   typedef std::numeric_limits<RealType> TMPlimit_t;

So far, so good you say. Just implement the first work-around.

However, I tried to instantiate uniform_01<mt19937, int> with this
work-around enabled. And guess what? VC6 does compile this STATIC_ASSERT as

Just to test, I tried to use
This actually gives an error C2059: syntax error : '>', in both cases where
RealType is an int or a double...

So, as far as I can see, there is no point in having these static_asserts
enabled on VC6, and I am defining BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
before including random.hpp.

All the best

Kris Thielemans
Imaging Research Solutions Ltd

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