enable_if doc page says:
Constructors and destructors do not have a return type; an extra argument is the only option.
Are destructors overloadable?
enable_if doc page says:
Constructors and destructors do not have a return type; an extra argument is the only option.
Are destructors overloadable?
The answer is plain No.
Two versions of desturctor cannot co-exist in a
class
body.However unlike the popular belief, note that destructor does have 2 syntax.
Syntax-2 is less popular. But it is mandatory, if the base class destructor contains similar syntax. The best example is inheriting
std::exception
.Note that, not complying to such syntax results in:
No