Skip to content

Commit 23e9a24

Browse files
committed
⬆️ [release] v1.1.6
1 parent e051103 commit 23e9a24

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ send: 42
315315
* [Plant UML Integration](https://boost-ext.github.io/sml/examples.html#plant-uml-integration)
316316
* [FAQ](https://boost-ext.github.io/sml/faq.html)
317317
* [CHANGELOG](https://boost-ext.github.io/sml/CHANGELOG.html)
318+
* [[1.1.6] - 2022-09-07](https://boost-ext.github.io/sml/CHANGELOG.html#116-2022-09-07)
318319
* [[1.1.5] - 2022-03-23](https://boost-ext.github.io/sml/CHANGELOG.html#115-2022-03-23)
319320
* [[1.1.4] - 2021-02-16](https://boost-ext.github.io/sml/CHANGELOG.html#114-2021-02-16)
320321
* [[1.1.3] - 2020-08-02](https://boost-ext.github.io/sml/CHANGELOG.html#113-2020-08-02)

doc/CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
1+
## [1.1.6] - 2022-09-07
2+
- **Bug Fixes**
3+
- [Issues](https://github.com/boost-ext/sml/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed+closed%3A2022-03-23..2020-09-07+)
4+
>
5+
- **Contributions**
6+
- [Ladislas de Toldi](https://github.com/ladislas)
7+
18
## [1.1.5] - 2022-03-23
2-
- **Additions**
9+
- **Bug Fixes**
10+
- [Issues](https://github.com/boost-ext/sml/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed+closed%3A2021-02-16..2022-03-23+)
311

412
## [1.1.4] - 2021-02-16
513
- **Additions**
614
- LICENSE file
715

16+
- **Bug Fixes**
17+
- [Issues](https://github.com/boost-ext/sml/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed+closed%3A2020-08-02..2021-02-16+)
18+
819
## [1.1.3] - 2020-08-02
920
- **Additions**
1021
- Support for member-function like guards/actions
@@ -86,6 +97,9 @@
8697
##[1.0.0] - 2016-01-28
8798
- Initial version
8899

100+
[1.1.6]: https://github.com/boost-ext/sml/compare/v1.1.5...v1.1.6
101+
[1.1.5]: https://github.com/boost-ext/sml/compare/v1.1.4...v1.1.5
102+
[1.1.5]: https://github.com/boost-ext/sml/compare/v1.1.4...v1.1.5
89103
[1.1.4]: https://github.com/boost-ext/sml/compare/v1.1.3...v1.1.4
90104
[1.1.3]: https://github.com/boost-ext/sml/compare/v1.1.2...v1.1.3
91105
[1.1.2]: https://github.com/boost-ext/sml/compare/v1.1.1...v1.1.2

include/boost/sml.hpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
#if (__cplusplus < 201305L && _MSC_VER < 1900)
1010
#error "[Boost::ext].SML requires C++14 support (Clang-3.4+, GCC-5.1+, MSVC-2015+)"
1111
#else
12-
#define BOOST_SML_VERSION 1'1'5
12+
#define BOOST_SML_VERSION 1'1'6
1313
#define BOOST_SML_NAMESPACE_BEGIN \
1414
namespace boost { \
1515
inline namespace ext { \
1616
namespace sml { \
17-
inline namespace v1_1_5 {
17+
inline namespace v1_1_6 {
1818
#define BOOST_SML_NAMESPACE_END \
1919
} \
2020
} \
@@ -1426,7 +1426,7 @@ struct sm_impl : aux::conditional_t<aux::is_empty<typename TSM::sm>::value, aux:
14261426
__BOOST_SML_REQUIRES(!aux::is_base_of<get_generic_t<TEvent>, events_ids_t>::value &&
14271427
!aux::is_base_of<get_mapped_t<TEvent>, events_ids_t>::value &&
14281428
!aux::is_same<get_event_t<TEvent>, initial>::value)>
1429-
bool process_internal_events(const TEvent&, TDeps &, TSubs &, Ts &&...) {
1429+
bool process_internal_events(const TEvent &, TDeps &, TSubs &, Ts &&...) {
14301430
return false;
14311431
}
14321432
template <class TEvent, class TDeps, class TSubs, class... Ts,
@@ -1720,7 +1720,7 @@ class sm {
17201720
aux::get<sm_impl<TSM>>(sub_sms_).start(deps_, sub_sms_);
17211721
}
17221722
template <class... TDeps, __BOOST_SML_REQUIRES((sizeof...(TDeps) > 1) && aux::is_unique_t<TDeps...>::value)>
1723-
explicit sm(TDeps &&...deps) : deps_{aux::init{}, aux::pool<TDeps...>{deps...}}, sub_sms_{aux::pool<TDeps...>{deps...}} {
1723+
explicit sm(TDeps &&... deps) : deps_{aux::init{}, aux::pool<TDeps...>{deps...}}, sub_sms_{aux::pool<TDeps...>{deps...}} {
17241724
aux::get<sm_impl<TSM>>(sub_sms_).start(deps_, sub_sms_);
17251725
}
17261726
sm(aux::init, deps_t &deps) : deps_{deps}, sub_sms_{deps} { aux::get<sm_impl<TSM>>(sub_sms_).start(deps_, sub_sms_); }
@@ -1750,7 +1750,13 @@ class sm {
17501750
using sm_impl_t = sm_impl<typename TSM::template rebind<type>>;
17511751
using state_t = typename sm_impl_t::state_t;
17521752
using states_ids_t = typename sm_impl_t::states_ids_t;
1753-
return aux::get_id<state_t, typename TState::type>((states_ids_t *)0) == aux::cget<sm_impl_t>(sub_sms_).current_state_[0];
1753+
auto result = false;
1754+
visit_current_states<T>([&](auto state) {
1755+
(void)state;
1756+
result |= (aux::get_id<state_t, typename TState::type>((states_ids_t *)0) ==
1757+
aux::get_id<state_t, typename decltype(state)::type>((states_ids_t *)0));
1758+
});
1759+
return result;
17541760
}
17551761
template <class T = aux::identity<sm_t>, template <class...> class TState>
17561762
bool is(const TState<terminate_state> &) const {

0 commit comments

Comments
 (0)