Skip to content

Use vtable for protocol_view member function forwarding - #174

Draft
jbcoe wants to merge 5 commits into
jbcoe-implementation-stubsfrom
jbcoe-implementation-vtable
Draft

Use vtable for protocol_view member function forwarding#174
jbcoe wants to merge 5 commits into
jbcoe-implementation-stubsfrom
jbcoe-implementation-vtable

Conversation

@jbcoe

@jbcoe jbcoe commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Adds a data-pointer and vtable-pointer member to protocol_view enabling member function forwarding.

protocol remains signature-only for member functions as ownership makes implementation slightly trickier.

Overloads are still unsupported.

protocol_view<const T> needs to be added as constructing protocol<T> from a const object is (correctly) not allowed.

@jbcoe
jbcoe force-pushed the jbcoe-implementation-vtable branch from bf531a1 to ef90dd5 Compare August 25, 2026 18:17
@RyanJK5

RyanJK5 commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Q: should constructing protocol<Interface> from a const T be allowed if Interface only has const member functions?

@jbcoe
jbcoe force-pushed the jbcoe-implementation-vtable branch from ef90dd5 to d25724b Compare August 27, 2026 09:01
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.

2 participants