Modify

Ticket #5399 (closed Bugs: fixed)

Opened 3 years ago

Last modified 5 weeks ago

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

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

Change History

comment:1 Changed 3 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 3 years ago by matthewbg@…

Changed 3 years ago by matthewbg@…

Now with requisite #includes

Changed 21 months ago by gromer@…

New patch as of 1.49.0

comment:2 Changed 21 months 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 18 months 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 17 months ago by marshall

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

comment:5 Changed 17 months ago by marshall

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

comment:6 Changed 14 months ago by mgaunard

  • Cc loufoque@… added

comment:7 Changed 8 months 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 5 weeks ago by steven_watanabe

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

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
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.