Partial specialization for one method in the class
问题 I have a template matrix class. I try to implement the size (always square) as a template parameter. template< // Type of data typename type_t, // dimension of the matrix 4 -> 4x4 std::size_t dim_t, // I don't want a matrix of non numeric value typename = typename std::enable_if_t< std::is_arithmetic_v< type_t >, type_t > > class Matrix final { // .... } With this code, I would like to be able to make a different method for different sizes of matrix. Because some method force me to take it