|
Boost : |
From: Hugo Duncan (hugoduncan_at_[hidden])
Date: 2003-10-30 16:05:27
Jens Maurer <Jens.Maurer_at_[hidden]> wrote:
> Could you try again with numeric_limits<>?
> The "enum" stuff that is in the CVS has been done
> on purpose, so any Borland solution should be #ifdef'ed.
numeric_limits<> as implement in bcc56 provides values that
are not useable as template paramters, and can not be assigned
at compile time to enums. eg in variate_generator have_int is
always 0 and want_int is always 1 (even if at runtime they
have the correct values).
Would a borland only version (attatched) that used
boost::is_integer be acceptable ?
Hugo
Index: variate_generator.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/random/variate_generator.hpp,v
retrieving revision 1.3
diff -r1.3 variate_generator.hpp
29a30,34
> // Borland C++ 5.6.0 has problems using its numeric_limits traits as
> // template parameters
> #if BOOST_WORKAROUND(__BORLANDC__, <= 0x564)
> #include <boost/type_traits/is_integral.hpp>
> #endif
102c107
<
--- > 112a118,123 > #if BOOST_WORKAROUND(__BORLANDC__, <= 0x564) > typedef typename random::detail::engine_helper< > boost::is_integral<typename decorated_engine::result_type>::value, > boost::is_integral<typename Distribution::input_type>::value > >::BOOST_NESTED_TEMPLATE impl<decorated_engine, typename Distribution::input_type>::type internal_engine_type; > #else 117a129 > #endif
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk