I tried using CTAD with SFINAE in partial specializations, but it doesn't compile unless I add a seemingly useless deduction guide. What's the reason/limitation behind?
template<typename T, typename Enable = void>
struct A;
template<typename T>
struct A< T, std::enable_if_t<std::is_arithmetic_v<T>>>
{
A(T) { std::cout << "Numerical"; }
};
template<typename T>
struct A<T, std::enable_if_t<!std::is_arithmetic_v<T>>>
{
A(T) { std::cout << "Other"; }
};
template<typename T>
A(T)->A<T>; //Need to have this, otherwise doesn't compile
int main()
{
A a{ 1 };
}