From: Csaba Szepesvari (cszepes_at_[hidden])
Date: 2003-05-19 11:10:38
trying to compile the minimal sample code below I get:
'std::numeric_limits<`template-parameter258'>::is_integer' : illegal use of
this type as an expression
c:\dev\include\boost\random\uniform_01.hpp(95) : see reference to
class template instantiation
'boost::uniform_01<UniformRandomNumberGenerator,RealType>' being compiled
The problem is that although random.hpp includes limits.hpp from boost and
includes boost/detail/limits.hpp only if BOOST_NO_LIMITS is defined.
Wouldn't it be good to add BOOST_NO_LIMITS to either
- the random library
I understand that the user should (maybe) decide about using
the user also wants random.hpp compiling "out-of-box".
Maybe, should add BOOST_NO_LIMITS_ASWORKAROUND
and limits.hpp should also check this and if defined include
Well, this could cause other problems if the user inadvertantly(:)) includes
<limits> in the same compilation unit.
But then at least the user would face the real problem and could decide what
(Maybe some documentation of this would also be useful e.g. documenting what
libs workarounds that incluences the files the user can include.
------------- SAMPLE CODE ---------------------------
using namespace boost;
int x = mm();
std::cout << x;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk