Opened 15 years ago

Closed 15 years ago

#1423 closed Bugs (fixed)

MSVC uniform int workaround not required for VC++ 2008

Reported by: jrp@… Owned by:
Milestone: Boost 1.35.0 Component: random
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

random.test fails to compile (http://tinyurl.com/2wevvb)

One possible fix is at line 137 of uniform_int.hpp:

# if BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300 && BOOST_MSVC < 1500

whereupon randon.test compiles and generates

Running 1 test case...
Basic tests for rand48; seeding uses 1 words
Basic tests for minstd_rand0; seeding uses 1 words
Basic tests for minstd_rand; seeding uses 1 words
Basic tests for ecuyer1988; seeding uses 2 words
Basic tests for kreutzer1986; seeding uses 1 words
Basic tests for hellekalek1995; seeding uses 1 words
Basic tests for mt11213b; seeding uses 351 words
Basic tests for mt19937; seeding uses 624 words
Basic tests for lagged_fibonacci; seeding uses 607 words
Basic tests for lagged_fibonacci607; seeding uses 1214 words
Basic tests for ranlux3; seeding uses 24 words
Basic tests for ranlux4; seeding uses 24 words
Basic tests for ranlux3_01; seeding uses 24 words
Basic tests for ranlux4_01; seeding uses 24 words
Basic tests for ranlux64_3_01; seeding uses 48 words
Basic tests for ranlux64_4_01; seeding uses 48 words
Basic tests for taus88; seeding uses 3 words
validating rand48: 1993516219
validating minstd_rand: 399268537
validating minstd_rand0: 1043618065
validating ecuyer combined: 2060321752
validating mt11213b: 3809585648
validating mt19937: 4123659995
validating kreutzer1986: 139726
validating ranlux3: 5957620
validating ranlux4: 8587295
validating ranlux3_01: 0.355102
validating ranlux4_01: 0.511843
validating ranlux64_3_01: 0.838413
validating ranlux64_4_01: 0.59839
validating taus88: 3535848941
validating lagged_fibonacci607: 0.401269
testing uniform_int(1,2)
testing uniform_int(1,6)
   ... has bucket[5] = 16420  (distance -246.667)
testing uniform_int(0,1)
testing uniform_int(-3,2)
   ... has bucket[0] = 16490  (distance -176.667)
   ... has bucket[4] = 16836  (distance 169.333)
testing uniform_int(1,4)
uniform_int(1,1) 1, 1, 1

*** No errors detected
 
EXIT STATUS: 0 

Change History (1)

comment:1 by Marshall Clow, 15 years ago

Resolution: fixed
Severity: ShowstopperProblem
Status: newclosed

Fixed in revision 42141.

Note: See TracTickets for help on using tickets.