ialise:</p><pre><code>// For strings
string deserialise(T)(JSONValue json)
if(is(T == string))
{ /*code here*/ }

// For floats and doubles
T deserialise(T)(JSONValue json)
if(isFloatingPoint!T)
{ /*code here*/ }

// Using both constraints, and static if chains
T deserialise(T)(JSONValue json)
if(isIntegral!T)
{
    static if(isSigned!T)
    { /**/ }
    else static if(isUnsigned!T)
    { /**/ }
}

// etc.
</code></pre><h2 id="conclusion">Conclusion</h2><pre><code>
</code></pre><p>There are pros and cons to