Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51311 - trunk/boost/random
From: steven_at_[hidden]
Date: 2009-02-18 12:54:27


Author: steven_watanabe
Date: 2009-02-18 12:54:27 EST (Wed, 18 Feb 2009)
New Revision: 51311
URL: http://svn.boost.org/trac/boost/changeset/51311

Log:
Change shfit2 to shift2. Add missing namespace scope definitions of shift1 and shift2. Fixes #2764
Text files modified:
   trunk/boost/random/xor_combine.hpp | 24 ++++++++++++------------
   1 files changed, 12 insertions(+), 12 deletions(-)

Modified: trunk/boost/random/xor_combine.hpp
==============================================================================
--- trunk/boost/random/xor_combine.hpp (original)
+++ trunk/boost/random/xor_combine.hpp 2009-02-18 12:54:27 EST (Wed, 18 Feb 2009)
@@ -26,13 +26,13 @@
 namespace boost {
 namespace random {
 
-template<class URNG1, int s1, class URNG2, int s2,
 #ifndef BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
- typename URNG1::result_type
+ #define BOOST_RANDOM_VAL_TYPE typename URNG1::result_type
 #else
- uint32_t
+ #define BOOST_RANDOM_VAL_TYPE uint32_t
 #endif
- val = 0>
+
+template<class URNG1, int s1, class URNG2, int s2, BOOST_RANDOM_VAL_TYPE val = 0>
 class xor_combine
 {
 public:
@@ -42,7 +42,7 @@
 
   BOOST_STATIC_CONSTANT(bool, has_fixed_range = false);
   BOOST_STATIC_CONSTANT(int, shift1 = s1);
- BOOST_STATIC_CONSTANT(int, shfit2 = s2);
+ BOOST_STATIC_CONSTANT(int, shift2 = s2);
 
   xor_combine() : _rng1(), _rng2()
   { }
@@ -114,16 +114,16 @@
 
 #ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
 // A definition is required even for integral static constants
-template<class URNG1, int s1, class URNG2, int s2,
-#ifndef BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
- typename URNG1::result_type
-#else
- uint32_t
-#endif
- val>
+template<class URNG1, int s1, class URNG2, int s2, BOOST_RANDOM_VAL_TYPE val>
 const bool xor_combine<URNG1, s1, URNG2, s2, val>::has_fixed_range;
+template<class URNG1, int s1, class URNG2, int s2, BOOST_RANDOM_VAL_TYPE val>
+const int xor_combine<URNG1, s1, URNG2, s2, val>::shift1;
+template<class URNG1, int s1, class URNG2, int s2, BOOST_RANDOM_VAL_TYPE val>
+const int xor_combine<URNG1, s1, URNG2, s2, val>::shift2;
 #endif
 
+#undef BOOST_RANDOM_VAL_TYPE
+
 } // namespace random
 } // namespace boost
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk