-
Notifications
You must be signed in to change notification settings - Fork 750
Allow upcasting #944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
captain-yoshi
wants to merge
20
commits into
BehaviorTree:master
Choose a base branch
from
captain-yoshi:allow-upcasting
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Allow upcasting #944
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c105c75
Enable polymorphic shared_ptr downcasting in Any using type traits
captain-yoshi 14815b5
Enable blackboard matching for types sharing a common base class
captain-yoshi 6183340
Add test fixture for Greeter type hierarchy and type trait registration
captain-yoshi d644f67
Add unit test for Any/Blackboard type casting
captain-yoshi f403fb6
Avoid std::is_polymorphic instantiation on incomplete types
captain-yoshi 5829a40
Refactor castPtr() to unify shared_ptr casting logic
captain-yoshi 4a2e42c
Support recursive root base resolution for polymorphic shared_ptr types
captain-yoshi 6f0c367
Adjust any_cast_base<FancyHelloGreeter> to map to HelloGreeter
captain-yoshi d313bec
Add compile-time base class chain introspection using any_cast_base
captain-yoshi f90f822
Extend TypeInfo to store and expose base class chain
captain-yoshi 423e970
Add unit test for upcasting base type chain in PortInfo
captain-yoshi 8ac0c1c
Use original typeid for shared_ptr types in TypeInfo::Create()
captain-yoshi 12c1377
Add PortInfo constructors that accept TypeInfo for cleaner initializa…
captain-yoshi 42b1d80
Allow port type mismatch if convertible via base class chain
captain-yoshi 5090086
Improve test coverage for polymorphic port casting
captain-yoshi eda2683
Make test platform-independent by relaxing exact exception message check
captain-yoshi cad9a05
Refactor upcasting tests to use clearer Animal hierarchy example
captain-yoshi 5f94fea
Restrict polymorphic upcast to INPUT ports only during type resolution
captain-yoshi 1ce5185
Revert to direct type_index comparison in Blackboard::set()
captain-yoshi 67276dd
Add caching mechanism for derived castPtr() in Any
captain-yoshi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Refactor castPtr() to unify shared_ptr casting logic
Introduced _cached_derived_ptr to temporarily store downcasted shared_ptr results which are polymorphic and base-registered.
- Loading branch information
commit 5829a40a266d6fda7046096081faed991db1125f
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] When Base and Derived are identical, consider using static_cast instead of reinterpret_cast to improve type safety and clarify conversion intent.
Copilot uses AI. Check for mistakes.