#include <type_traits>
#include <iostream>
template<typename... args_t>
auto f(args_t&&... args) -> std::enable_if_t<(std::is_same_v<double,args_t> && ...),void>
{
std::cout << "All doubles\n";
}
template<typename... args_t>
auto f(int arg, args_t&&... args) -> std::enable_if_t<(std::is_same_v<double,args_t> && ...),void>
{
std::cout << "First one is an int the rest is all doubles\n";
}
int main()
{
f(1.0,2.0,3.0);
f(1,2.0,3.0);
// f(1,2.f,3.0); // This one should not compile, there is a float argument in there
return 0;
}