Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9234: noexcept creation of a number from string
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-12 11:21:40
#9234: noexcept creation of a number from string
-------------------------------+----------------------------
Reporter: psiha | Owner: johnmaddock
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: multiprecision
Version: Boost 1.54.0 | Severity: Optimization
Resolution: wontfix | Keywords:
-------------------------------+----------------------------
Comment (by psiha):
* BOOST_NO_EXCEPTIONS disables exceptions for all Boost, that's not what I
want...Exception semantics and overhead maybe appropriate in someplaces
while not in others, IMNHO a subset of fixed-sized mathematical operations
where I know in advance nothing should fail is one such place
[[BR]]
* the problem with (needless) EH is not (just) speed but bloat, you
certainly know that any non-noexcept function makes all of its callers
also non-noexcept and inserts EH code in all of them if they have objects
with non trivial desctructors (which with MSVC is sadly even an empty but
explicitly defined destructor) as well as it hinders things like inlining
[[BR]]
* in my use case for example I might know that I am passing a valid
(possibly hardcoded) string and the only way your constructor can fail is
if some hacker has fiddled with the binary in which case I don't want any
expected error handling route to be taken (a call to throw is certainly
one of them)...I really do want the process to visit a random star in the
access vioalation galaxy using the undefined behaviour spaceship and then
crash and burn there!
[[BR]]
* you might consider using boost::string_ref now to simplify your code
I won't reopen this ticket, I'll rather create a new one for noexcept
fixedsized unchecked unsigned cpp_ints...
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9234#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC