Skip to content

Conversation

@dtolnay
Copy link
Owner

@dtolnay dtolnay commented Mar 25, 2021

Using the raw pointer addr_of macro, it's possible for the vtable methods to avoid instantiating any & or &mut and operate only in terms of pointers, allowing Deref and DerefMut to reuse a single piece of vtable logic, and downcast_ref and downcast_mut to reuse a single piece.

Closes #62.
FYI @thomcc

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider using pointers and &raw operator in object_downcast implementation

2 participants