Opened 10 years ago

Closed 10 years ago

#7497 closed Bugs (duplicate)

Boost.Random does not work with exceptions disabled

Reported by: Mathias Gaunard Owned by: Steven Watanabe
Milestone: To Be Determined Component: random
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description (last modified by Mathias Gaunard)

cannot use 'throw' with exceptions disabled in .../boost_1_51_0/boost/random/detail/seed_impl.hpp

Please use BOOST_THROW_EXCEPTION instead of naked throw.

(assigning to Steven because he's the author of the file in question)

Attachments (1)

boost_random_throw_exception.diff (2.0 KB ) - added by Mathias Gaunard 10 years ago.
replace throw by boost::throw_exception

Download all attachments as: .zip

Change History (5)

comment:1 by Mathias Gaunard, 10 years ago

Description: modified (diff)
Owner: changed from No-Maintainer to Steven Watanabe

comment:2 by Domagoj Šarić, 10 years ago

If I may add, please don't use exceptions for incorrect input/usage, that's what asserts are for. I really don't like code that doesn't allocate resources to add EH bloat...

by Mathias Gaunard, 10 years ago

replace throw by boost::throw_exception

comment:3 by Steven Watanabe, 10 years ago

Duplicates #5399.

comment:4 by Steven Watanabe, 10 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.