Modify

Opened 6 years ago

Closed 3 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@… 6 years ago.
boost_random_exceptions.2.patch (5.2 KB) - added by matthewbg@… 6 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 6 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 6 years ago by matthewbg@…

Changed 6 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 mikhailberis

  • 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

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

comment:5 Changed 5 years ago by marshall

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

comment:6 Changed 4 years ago by mgaunard

  • Cc loufoque@… added

comment:7 Changed 4 years ago by mikhailberis

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 3 years ago by steven_watanabe

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain steven_watanabe.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.