On Tuesday, 9 December 2014 at 20:19:59 UTC, H. S. Teoh via
Digitalmars-d wrote:
I don't see what's the problem with making it an "empty"
template. It
eliminates dead code in your executable if you never call that
function,
it enables attribute inference, and it allows inlining. The
only major
incompatibility I can see is the ability to ship closed-source
libraries, but in that case, inlining is already out of the
question
anyway, so it's a non-issue.
Or am I missing something obvious?
Because you don't really create a template that way but
workaround broken function behavior. It is not the usage of empty
templates that is bad but the fact that plain functions remain
broken => not really a solution.