Skip to content

Add support for private virtual functions #188

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

Merged
merged 2 commits into from
Dec 30, 2022
Merged

Add support for private virtual functions #188

merged 2 commits into from
Dec 30, 2022

Conversation

virtuald
Copy link
Member

  • You can't call them, but you can override them

@virtuald
Copy link
Member Author

Also added a static assert for when a trampoline is abstract, hopefully it's useful?

    build/temp.linux-x86_64-cpython-311/gensrc/rpytest_ft/abstract.cpp:40:71: error: static assertion failed: ::PrivateAbstract has an abstract trampoline -- and they must never be abstract! One of the generated override methods doesn't match the original class or its bases, or is missing. You will need to provide method and/or param overrides for that method. It is likely the following compiler error messages will tell you which one it is.
       40 |     static_assert(std::is_abstract<PrivateAbstract_Trampoline>::value == false, "::PrivateAbstract " RPYBUILD_BAD_TRAMPOLINE);
          |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
    build/temp.linux-x86_64-cpython-311/gensrc/rpytest_ft/abstract.cpp:40:71: note: the comparison reduces to ‘(1 == 0)’

@virtuald virtuald merged commit 514f1f4 into main Dec 30, 2022
@virtuald virtuald deleted the private-virtual branch December 30, 2022 16:24
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.

1 participant