title: Why does std::is_same always give me a compiling error
body: <p>In my project, there are some config files. I need to extract them either as integers or as strings. To do so, I write a function as below:</p>
  <pre><code>template&lt;typename T&gt;
  void loadTxtConfig(const std::string&amp; filename, std::set&lt;T&gt;&amp; ids) {
      std::ifstream infile(filename);
      if (!infile) {
          return;
      }
      std::string line;
      if (std::is_integral&lt;T&gt;::value) {
          while (std::getline(infile, line)) {
              ids.emplace(static_cast&lt;T&gt;(std::stoll(line))); // noexcept
          }
      } else if (std::is_same&lt;T, std::string&gt;::value) {
          while (std::getline(infile, line)) {
              ids.emplace(line);
          }
      }
  }
  </code></pre>
  <p>I try to cal it as below:</p>
  <pre><code>std::set&lt;int&gt; intCfg;
  std::set&lt;std::string&gt; strCfg;
  loadTxtConfig(&quot;./conf/int.txt&quot;, intCfg);
  loadTxtConfig(&quot;./conf/str.txt&quot;, strCfg);
  </code></pre>
  <p>However, when I compile it, I always get an error about template:</p>
  <pre><code>/usr/include/c++/5/ext/new_allocator.h:120:4: error: cannot convert ‘std::__cxx11::basic_string&lt;char&gt;’ to ‘int’ in initialization
    { ::new((void *)__p) _Up(std::forward&lt;_Args&gt;(__args)...); }
  </code></pre>
  <p>What did I wrongly do?</p>