erikzenker / hsm

Finite state machine library based on the boost hana meta programming library. It follows the principles of the boost msm and boost sml libraries, but tries to reduce own complex meta programming code to a minimum.
MIT License
187 stars 18 forks source link

[feat] Inject dispatch tables #153

Closed erikzenker closed 3 years ago

erikzenker commented 3 years ago

By injecting the dispatch tables we get rid of the static dispatch tables, which brings problems for #151

codecov-io commented 3 years ago

Codecov Report

Merging #153 (53e1b1b) into master (6844b22) will increase coverage by 0.99%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #153      +/-   ##
==========================================
+ Coverage   96.81%   97.80%   +0.99%     
==========================================
  Files          67       47      -20     
  Lines         972      501     -471     
==========================================
- Hits          941      490     -451     
+ Misses         31       11      -20     
Impacted Files Coverage Δ
include/hsm/details/collect_events.h 100.00% <ø> (ø)
include/hsm/details/dispatch_table.h 100.00% <ø> (ø)
include/hsm/details/make_states_map.h 100.00% <ø> (ø)
include/hsm/details/fill_dispatch_table.h 100.00% <100.00%> (ø)
include/hsm/details/make_dispatch_tables.h 100.00% <100.00%> (ø)
include/hsm/details/sm.h 86.66% <100.00%> (-12.00%) :arrow_down:
include/hsm/details/to_map.h 100.00% <100.00%> (ø)
test/unit/fill_dispatch_table_tests.cpp 100.00% <100.00%> (ø)
test/unit/make_dispatch_tables_tests.cpp 100.00% <100.00%> (ø)
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6844b22...53e1b1b. Read the comment docs.

erikzenker commented 3 years ago

It looks like msvs has problem evaluating if constexpr branches https://developercommunity.visualstudio.com/t/both-branches-of-if-constexpr-are-evaluated-for-ne/681044