Modify

Opened 7 years ago

Closed 4 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@… 7 years ago.
boost_random_exceptions.2.patch (5.2 KB) - added by matthewbg@… 7 years ago.
Now with requisite #includes
random_seed_impl_exceptions.patch (2.0 KB) - added by gromer@… 5 years ago.
New patch as of 1.49.0

Download all attachments as: .zip

Change History (11)

comment:1 Changed 7 years ago by anonymous

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)

Changed 7 years ago by matthewbg@…

Changed 7 years ago by matthewbg@…

Now with requisite #includes

Changed 5 years ago by gromer@…

New patch as of 1.49.0

comment:2 Changed 5 years ago by gromer@…

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 Changed 5 years ago by Dean Michael Berris

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 Changed 5 years ago by Marshall Clow

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

comment:5 Changed 5 years ago by Marshall Clow

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

comment:6 Changed 5 years ago by Mathias Gaunard

Cc: loufoque@… added

comment:7 Changed 4 years ago by Dean Michael Berris

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 Changed 4 years ago by Steven Watanabe

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steven Watanabe.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.