How do you restrict the allowed types in variadic templates and fold expression using C++20 concepts?
For example suppose I'd like to restrict the following fold expression to only support integral types, how would I do that?
#include <string>
#include <iostream>
#include <concepts>
using namespace std;
template<typename... Args> // requires (is_integral<Args>::value )
int sum(Args... args) { return (... + args); }
int main()
{
cout << sum(1,2,3);
}