```
template<typename T>
T add(T a, T b){
    static_assert(std::is_integral<T>::value 
                 || std::is_floating_point<T>::value
                 , "Not a numeric value");
    return a + b;
}

```

Are there other/better ways to enforce constraints on templates?