title: How to avoid "conditional expression is constant" warning with compile-time-constant conditions in template code?
body: <p>Consider the code:</p>
  
  <pre><code>template &lt;typename T&gt;
  CByteArray serialize(const T&amp; value)
  {
      if (std::is_pod&lt;T&gt;::value)
          return serializePodType(value);
      else if (std::is_convertible&lt;T, Variant&gt;::value)
          return serialize(Variant(value));
      else
      {
          assert(0 == "Unsupported type");
          return CByteArray();
      }
  }
  </code></pre>
  
  <p>Obviously, the compiler is right to give me this warning for <code>if (std::is_pod&lt;T&gt;::value)</code> etc., but how do I circumvent this? I can't find a way to avoid this check, and there's no <code>static if</code> in C++ (yet).</p>
  
  <p>Can SFINAE principle be used to avoid this <code>if</code>?</p>