title: Can I obtain C++ type names in a constexpr way?
body: <p>I would like to use the name of a type at compile time. For example, suppose I've written:</p>
  
  <pre><code>constexpr size_t my_strlen(const char* s)
  {
          const char* cp = s;
          while(*cp != '\0') { cp++; };
          return cp - s;
  }
  </code></pre>
  
  <p>and now I want to have:</p>
  
  <pre><code>template &lt;typename T&gt;
  constexpr auto type_name_length = my_strlen(typeid(T).name());
  </code></pre>
  
  <p>But alas, <code>typeid(T).name()</code> is just <code>const char*</code>, not constexpr... is there some other, constexpr way to get a type's name?</p>