Skip to content

fix(any_executor): support builds without RTTI - #450

Open
mvandeberg wants to merge 1 commit into
cppalliance:developfrom
mvandeberg:fix/448-any-executor-no-rtti
Open

mvandeberg wants to merge 1 commit into
cppalliance:developfrom
mvandeberg:fix/448-any-executor-no-rtti

Conversation

@mvandeberg

Copy link
Copy Markdown
Contributor

any_executor uses detail::type_id to identify the wrapped executor type. It does not use typeid. The header compiles with RTTI disabled.

target_type() returns detail::type_info const&. When RTTI is on, this type is std::type_info.

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.

Add a test that compiles and runs with RTTI disabled.

Closes #448

any_executor uses detail::type_id to identify the wrapped executor
type. It does not use typeid. The header compiles with RTTI disabled.

target_type() returns detail::type_info const&. When RTTI is on,
this type is std::type_info.

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.

Add a test that compiles and runs with RTTI disabled.

Closes cppalliance#448
@mvandeberg
mvandeberg requested a review from sgerbino October 9, 2026 21:54
@cppalliance-bot

Copy link
Copy Markdown

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-09 22:00:19 UTC

@cppalliance-bot

Copy link
Copy Markdown

GCOVR code coverage report https://450.capy.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://450.capy.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://450.capy.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-10-09 22:11:18 UTC

@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.14%. Comparing base (f764adc) to head (6143179).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #450      +/-   ##
===========================================
+ Coverage    98.09%   98.14%   +0.05%     
===========================================
  Files          130      130              
  Lines         6289     6321      +32     
===========================================
+ Hits          6169     6204      +35     
+ Misses         120      117       -3     
Flag Coverage Δ
linux 98.09% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
include/boost/capy/ex/any_executor.hpp 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

any_executor: raw typeid breaks no-RTTI builds; add target<Ex>() like executor_ref

2 participants