Nope! For much the same reason that template<typename T> S(T const&)
doesn't define a copy constructor. A lot of C++'s special member functions are required to not be templates. In this instance, a templated operator delete
is only selected for use from a placement-new expression.
The reasoning is basically "better safe than sorry". If templates could bind in these special cases, it would be way too easy to accidentally declare a special member function you didn't want to. In the copy constructor case, note how declaring such a constructor -- just so you could bind to, say, any integer type -- would spookily inhibit move construction of the class if it counted as a copy constructor.
And if that's actually what you want, of course, you can just declare the non-placement-delete, or copy constructor, or what-have-you, and have it delegate to the template. So the design here offers safety without overly constraining you.
delete
expressions (eel.is/c++draft/expr.delete#9.sentence-3) and consequently also for virtual destructors. – Ruder