Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9525: Assert with program termination due to context<...>() call in simple_state's entry action is incorrect
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-01-26 18:12:14
#9525: Assert with program termination due to context<...>() call in
simple_state's entry action is incorrect
-------------------------------+-----------------------------
Reporter: anonymous | Owner: andreas_huber69
Type: Bugs | Status: new
Milestone: To Be Determined | Component: statechart
Version: Boost 1.49.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+-----------------------------
Comment (by anonymous):
Replying to [comment:2 anonymous]:
> It says "must not call", but it doesn't say *anything* about getting an
assert and the program termination when you make a mistake (e.g. add
context() call to a simple_state constructor but forget to change
simple_state into state).
IIRC, neither do the standard docs for std::vector::end.
> Is this really the only way you can say "you've made a mistake" here?
The only other thing that comes to mind is throwing an exception, but
exceptions have the problem that they can be ignored. Calling context()
from a simple_state constructor makes the program broken beyond any hope
of recovery. If you have any other suggestions, I'm all ears.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9525#comment:3> 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:15 UTC