title: C++ convert integer to string at compile time
body: <p>I want to do something like this:</p>
  
  <pre><code>template&lt;int N&gt;
  char* foo() {
    // return a compile-time string containing N, equivalent to doing
    // ostringstream ostr; 
    // ostr &lt;&lt; N;
    // return ostr.str().c_str();
  }
  </code></pre>
  
  <p>It seems like the boost MPL library might allow this but I couldn't really figure out how to use it to accomplish this. Is this possible? </p>