Opened 12 years ago

Closed 9 years ago

#5399 closed Bugs (fixed)

random.hpp does not compile with exceptions off

Reported by: anonymous Owned by: Steven Watanabe
Milestone: To Be Determined Component: random
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc: loufoque@…

Description

boost/random.hpp includes boost/random/linear_congruential.hpp

which uses throw (instead of boost::throw_exception as it should)

with exceptions off, you cannot use throw(), try, catch, etc., hence BOOST_TRY, BOOST_CATCH, BOOST_RETHROW

Attachments (3)

boost_random_exceptions.patch (3.9 KB ) - added by matthewbg@… 11 years ago.
boost_random_exceptions.2.patch (5.2 KB ) - added by matthewbg@… 11 years ago.
Now with requisite #includes
random_seed_impl_exceptions.patch (2.0 KB ) - added by gromer@… 10 years ago.
New patch as of 1.49.0

Download all attachments as: .zip

Change History (11)

comment:1 by anonymous, 12 years ago

most of the other random files also throw exceptions (inversive_congruential.hpp, mersenne_twister.hpp, lagged_fibonacci.hpp, subtract_with_carry.hpp, linear_feedback_shift.hpp)

by matthewbg@…, 11 years ago

by matthewbg@…, 11 years ago

Now with requisite #includes

by gromer@…, 10 years ago

New patch as of 1.49.0

comment:2 by gromer@…, 10 years ago

This is still an issue as of 1.49.0, although the location that needs to be fixed has changed. I've attached an updated patch.

comment:3 by Dean Michael Berris, 10 years ago

Owner: changed from No-Maintainer to Steven Watanabe

Hi Steven -- I assume you're the new maintainer of the random library now, any update on whether we can get this fixed/addressed?

comment:4 by Marshall Clow, 10 years ago

(In [81379]) Replaced throw with boost::throw_exception; Refs #5399

comment:5 by Marshall Clow, 10 years ago

(In [81382]) Replaced throw with boost::throw_exception; Refs #5399

comment:6 by Mathias Gaunard, 10 years ago

Cc: loufoque@… added

comment:7 by Dean Michael Berris, 9 years ago

Can we get an update on when [81392] and [81379] will make it into a release? I still see this as an issue in 1.54.0.

comment:8 by Steven Watanabe, 9 years ago

Resolution: fixed
Status: newclosed

I've done full merge of Boost.Random, so this should be in the next release.

Note: See TracTickets for help on using tickets.