title: Check if a type is std::basic_string<T> at compile time in C++
body: <p>I have <code>is_string</code> defined as follow in my C++ code:</p>
  <pre><code>#include &lt;string&gt;
  
  template &lt;typename T&gt;
  struct is_string
  {
      static const bool value = false;
  };
  
  template &lt;class T, class Traits, class Alloc&gt;
  struct is_string&lt;std::basic_string&lt;T, Traits, Alloc&gt;&gt;
  {
      static const bool value = true;
  };
  
  int main()
  {
      std::cout &lt;&lt; is_string&lt;std::string&gt;::value &lt;&lt; std::endl;
      std::cout &lt;&lt; is_string&lt;std::wstring&gt;::value &lt;&lt; std::endl;
  
      return 0;
  }
  </code></pre>
  <p>It is true for both <code>std::string</code> and <code>std::wstring</code>.</p>
  <p>But I need a predicate like this:</p>
  <pre><code>is_string&lt;char, std::string&gt;::value //to be true
  is_string&lt;char, std::wstring&gt;::value //to be false
  is_string&lt;wchar_t, std::string&gt;::value //to be false
  is_string&lt;wchar_t, std::wstring&gt;::value //to be true
  </code></pre>
  <p>Is it possible to implement it?</p>