Specialize same operator for different traits
问题 I want to do the following with specialization by traits. Array Aa = Scalar in_a would use overload I . Array Aa = Array Bb would use overload II . In the following code, overload II never get used. Someone mentioned that T1 cannot be deduced in overload II . How to fix that? I used the C++ shell to compile the code with C++14. #include <iostream> #include <type_traits> using namespace std; class A; // forward declaration. template <typename T> struct is_A : false_type {}; template <> struct