...

/

Multiple Destructors with C++ Concepts

Multiple Destructors with C++ Concepts

Get an overview of the need for multiple destructors and how they were implemented before C++20.

Destructors can’t be overloaded. After all, they have no return type and they don’t take parameters. They’re also not really const because they destroy the underlying objects.

Yet, techniques did exist to have multiple destructors in a class before C++20. Those techniques are simplified in C++20.

The need for multiple destructors

We may need multiple destructions for ...