title: Invoke a may not existed member function by template
body: <p>How can I call a may-existing member function by template technology, I am not want to use virtual method, because the class is arbitrary.</p>
  
  <p>For example:</p>
  
  <pre><code>class A {
      void setValue(int value);
  };
  </code></pre>
  
  <p>How to define a template to call class <code>A</code>'s setValue if it existing, else do nothing.</p>
  
  <p>The template is something like:</p>
  
  <pre><code>template &lt;typename T&gt;
  struct call_if_exist {
      void invokeOrNot(T&amp; a, int value){ // EXISTING: setValue
          a.setValue(value);
      }
  }
  template &lt;typename T&gt;
  struct call_if_exist {
      void invokeOrNot(T&amp; a, int value){ // NOT EXISTING: do nothing
      }
  }
  </code></pre>
  
  <p>It's about invoking, not checking.</p>