title: Want kind of constexpr switch case on type
body: <p>I am currently doing this trick to have a cstring based on a type:</p>
  
  <pre><code>template&lt;class ListT&gt; static char constexpr * GetNameOfList(void)
  {
    return
    std::conditional&lt;
      std::is_same&lt;ListT, LicencesList&gt;::value, "licences",
      std::conditional&lt;
        std::is_same&lt;ListT, BundlesList&gt;::value, "bundles",
        std::conditional&lt;
          std::is_same&lt;ListT, ProductsList&gt;::value, "products",
          std::conditional&lt;
            std::is_same&lt;ListT, UsersList&gt;::value, "users",
            nullptr
          &gt;
        &gt;
      &gt;
    &gt;;
  }
  </code></pre>
  
  <p>But this code is not very good-looking, and if we want to check more types, this could be unreadable. Is it a way to do the same thing as if there were a switch case block?</p>
  
  <p>Actually, the code is more complicated than that, because std::conditional need some type, so we need some class to do the trick:</p>
  
  <pre><code>struct LicenceName { static char constexpr * value = "licences"; };
  </code></pre>
  
  <p>for example.</p>