c++ - When a compiler can infer a template parameter? -


Sometimes it does not work:

  template & lt; Class T & gt; Zero F (tt) {} template & lt; Square T & gt; Classroom Mylals {Public: Mayclass (TT) {}}; Zero test () {f  

Is there any way to hack around the above example? To wit. Compiler forces the constructor parameter to estimate the template parameters.

Will this be decided in the future, or there is no good reason?

What is the general rule when the compiler can guess the template parameter? Template parameters can be guessed for template templates