Skip to content
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

tidy: check for non-virtual destructors #2498

Merged
merged 1 commit into from
Nov 24, 2023
Merged

tidy: check for non-virtual destructors #2498

merged 1 commit into from
Nov 24, 2023

Commits on Nov 24, 2023

  1. tidy: check for non-virtual destructors

    The check implements [this guideline][1]. A base class' destructor
    should either be public and virtual, meaning that the object can be
    destroyed through a pointer to the base class (e.g. a unique_ptr<Base>),
    or protected and non-virtual, meaning that the destructor cannot be
    invoked on a pointer to the base class. Private destructors would mean
    that children can't invoke the parent destructor, which is undesirable.
    
      [1]: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-dtor-virtual
    Riolku committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    a816d5e View commit details
    Browse the repository at this point in the history