valid template argument
<blockquote>
  <p>A template argument can be a constant expression (§C.5), the address of an object or function with external linkage (§9.2),     or a non-overloaded pointer to member (§15.5). A pointer used as a template argument must be of the form <code>&amp;ooff</code>,      where <code>ooff</code> is the name of an object or a function, or of the form <code>ff</code>, where <code>ff</code> is the name of a function. A pointer to      member must be of the form <code>&amp;XX::ooff</code>, where <code>ooff</code> is the name of an member. In particular, a string literal is not      acceptable as a template argument.</p>
</blockquote>

<p>This is from stroustrup book. What's the logic behind what's allowed and what's not? Why string literal is not acceptable?</p>

<p>My understanding is that compiler should be able to deduce the type of the argument,  so that it can generate code internally for that given type. Thanks for the help</p>
