I want to force the variadic templates's type to be of certain types, I thought doing this would work
auto sum( A... )( A a ) if( isIntegral!( typeid( a[ 0 ] ) ) )
{
    int temp;
    foreach( t ; a )
    {
        temp += t;
    }
    return temp;
}
but it gives out error
( note : I want all the parameter to be integral, i.e sum( 1, 2, 5, "error" ); //error

Reply via email to