title: Is there a way to determine if a parameter is a literal string?
body: <p>My question is:</p>
  
  <p><strong>Is there a way to determine whether a parameter is a literal string or not?</strong></p>
  
  <pre><code>template&lt;class T&gt;
  bool IsLiteral(T arg)
  {
      // How to implement?
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>template&lt;class T&gt;
  struct IsLiteral { enum { value = ??? }; };
  </code></pre>
  
  <p>So that we can write the following code:</p>
  
  <pre><code>char* p = "Hello";
  
  assert(IsLiteral(p)); // fail.
  assert(IsLiteral("Hello")); // never fail.
  assert(IsLiteral&lt;decltype("Hello")&gt;::value); // never fail.
  </code></pre>