title: Will the pointer to a template member function inside a constructor force instantiation?
body: <p>Consider the following header file:</p>
  
  <pre><code>// Foo.h
  class Foo {
      public: template &lt;typename T&gt; void read(T&amp; value);
  };
  </code></pre>
  
  <p>It seems that assigning a pointer to <code>Foo::read&lt;T&gt;</code> in the constructor of a class, of which variable is then declared, cause instantiation:</p>
  
  <pre><code>// Foo.cc
  #include "Foo.h"
  
  template &lt;typename T&gt;
  void Foo::read(T&amp; value) { /* do something */ }
  
  template &lt;typename T&gt; struct Bar {
      Bar&lt;T&gt;() { void (Foo::*funPtr)(T&amp;) = &amp;Foo::read&lt;T&gt;; }
  };
  
  static Bar&lt;int  &gt; bar1;
  static Bar&lt;long &gt; bar2;
  static Bar&lt;float&gt; bar3;
  </code></pre>
  
  <p>Is this solution reliable / portable / standard-conformant? (It works at least with Intel and GNU compilers.)</p>
  
  <p>If you wonder why not to simply use <code>template Foo::read&lt;int&gt;(int&amp;);</code> see <a href="https://stackoverflow.com/q/5715586/580083">this question</a>.</p>