title: Call function based on template argument type
body: <p>There are two "C" functions: </p>
  
  <pre><code>void fooA(const char*);
  void fooW(const wchar_t*);
  </code></pre>
  
  <p>Then there is a wrapper template function:</p>
  
  <pre><code>template&lt;typename _TChar&gt;
  void foo(const _TChar* str)
  {
       // call fooA or fooB based on actual type of _TChar
       // std::conditional .. ?
           // fooA(str); 
           // fooW(str);
  }
  </code></pre>
  
  <p>If the caller calls <code>foo("Abc")</code>, this template function should make a compile-time call to <code>fooA</code>.  Similiarly, <code>foo(L"Abc")</code> should make the final call to <code>fooW</code>. </p>
  
  <p>How do I do that? I thought of using <code>std::conditional</code> but couldn't make it.</p>
  
  <p>I cannot make <code>fooA</code> or <code>fooB</code> overloaded, since these are C functions.</p>