Repository navigation
fix(any_executor): support builds without RTTI - #450
mvandeberg wants to merge 1 commit into
Conversation
|
An automated preview of the documentation is available at https://450.capy.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-10-12 16:44:29 UTC |
|
GCOVR code coverage report https://450.capy.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-10-12 16:57:54 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #450 +/- ##
========================================
Coverage 98.09% 98.09%
========================================
Files 130 130
Lines 6289 6313 +24
========================================
+ Hits 6169 6193 +24
Misses 120 120
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
any_executor uses detail::type_id to identify the wrapped executor type. It does not use typeid. The header compiles with RTTI disabled. Remove target_type(). Its return type would have been detail::type_info const&, so code that builds both with and without RTTI could only compare it against a detail type. This is a breaking change. Use target<Ex>() instead. Add target<Ex>() in const and non-const forms, as in executor_ref. It returns a pointer to the wrapped executor. It returns nullptr if the type does not match or if the any_executor is empty. executor_ref::target() is now noexcept. It returns nullptr when the executor_ref is empty instead of dereferencing a null vtable. Add a test that compiles and runs with RTTI disabled. Closes cppalliance#448
6143179 to
5274f2c
Compare
any_executorusesdetail::type_idto identify the wrapped executor type. It does not usetypeid. The header compiles with RTTI disabled.target_type()returnsdetail::type_info const&. When RTTI is on, this type isstd::type_info.Add
target<Ex>()in const and non-const forms, as inexecutor_ref. It returns a pointer to the wrapped executor. It returns nullptr if the type does not match or if the any_executor is empty.Add a test that compiles and runs with RTTI disabled.
Closes #448