title: Any potential problem with using std::is_same_v rather than overload or specialization?
body: <p>For example, I've got this:</p>
  
  <pre><code>// Code A
  int create_int() { return 42; }
  double create_double() { return 3.14; }
  std::string create_string() { return {"Hi"}; }
  </code></pre>
  
  <p>Now let's assume that it makes sense to put these <code>create</code>s together, so I rewrite the code:</p>
  
  <pre><code>// Code B
  template &lt;typename T&gt; T create();
  template &lt;&gt; int create&lt;int&gt;() { return 42; }
  template &lt;&gt; double create&lt;double&gt;() { return 3.14; }
  template &lt;&gt; std::string create&lt;std::string&gt;() { return {"Hi"}; }
  </code></pre>
  
  <p>Or even:</p>
  
  <pre><code>// Code C
  #include &lt;type_traits&gt;
  
  template &lt;typename T&gt; T create()
  {
      if constexpr (std::is_same_v&lt;T, int&gt;)
      {
          return 42;
      }
      else if constexpr (std::is_same_v&lt;T, double&gt;)
      {
          return 3.14;
      }
      else if constexpr (std::is_same_v&lt;T, std::string&gt;)
      {
          return {"Hi"};
      }
      else
      {
          // static_assert(false);
          return static_cast&lt;T&gt;(0);
      }
  }
  </code></pre>
  
  <p>I wanna to know is there any difference between these codes, or is it just about code style.</p>