title: C++ convert string to typename
body: <p>So I've found a variety of articles and posts saying that there is no way to convert <code>typename</code> to <code>string</code> but I haven't found one about the opposite. I have a <code>template</code> of a function with specializations:</p>
  
  <pre><code>template &lt;typename T&gt;
  void foo(T sth) {}
  
  template &lt;&gt;
  void foo&lt;int&gt;(int sth) {}
  ...
  </code></pre>
  
  <p>and I'm reading from a file constructed like this:</p>
  
  <pre><code>int 20
  double 12.492
  string word
  </code></pre>
  
  <p>Is there a way to call the correct specialization of <code>foo()</code> depending on the content of the file?</p>