Solution: Container Class with Multiple Destructors
Explore how to apply C++20 Concepts for defining multiple destructors in container classes. Understand how to differentiate trivial and non-trivial destructible types using requires clauses, and see practical effects in template-based container destruction.
We'll cover the following...
We'll cover the following...
Solution
On line 19, a destructor is implemented that requires std::is_trivially_destructible_v<T>. On line 25, the destructor for non-trivial types with ...