Concepts enforce semantic requirements on template parameters at compile-time, producing clear compiler diagnostic messages rather than pages of template substitution errors.
cpp
template<typename T>
concept Numeric = std::is_integral_v<T> || std::is_floating_point_v<T>;
template<Numeric T>
T add(T a, T b) { return a + b; }